diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-08-21 04:20:46 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-08-21 04:20:46 +0200 |
commit | c392c9920f9baadc9267e726b46b9c64c82915c7 (patch) | |
tree | 91f3749ef5e3c3b2654348d2a9f3788452fde989 /reader.c | |
parent | fe3f8e3e172818741f32f5ea0bba27f77ca56a1a (diff) | |
download | ipecamera-c392c9920f9baadc9267e726b46b9c64c82915c7.tar.gz ipecamera-c392c9920f9baadc9267e726b46b9c64c82915c7.tar.bz2 ipecamera-c392c9920f9baadc9267e726b46b9c64c82915c7.tar.xz ipecamera-c392c9920f9baadc9267e726b46b9c64c82915c7.zip |
Fix some warnings and add debugging information into the build
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -38,8 +38,10 @@ } \ } -//#define CHECK_FRAME_MAGIC(buf) \ -// memcmp(buf, ((void*)frame_magic) + 1, sizeof(frame_magic) - 1) +/* +#define CHECK_FRAME_MAGIC(buf) \ + memcmp(buf, ((void*)frame_magic) + 1, sizeof(frame_magic) - 1) +*/ #define CHECK_FRAME_MAGIC(buf) \ memcmp(((ipecamera_payload_t*)(buf)) + 1, &frame_magic[1], sizeof(frame_magic) - sizeof(ipecamera_payload_t)) @@ -341,14 +343,13 @@ void *ipecamera_reader_thread(void *user) { } #ifdef IPECAMERA_BUG_STUCKED_BUSY GET_REG(status2_reg, value); - if (value&0x2FFFFFFF) { + if ((!err)&&(value&0x2FFFFFFF)) { pcilib_warning("Camera stuck in busy, trying to recover..."); GET_REG(control_reg, saved); SET_REG(control_reg, IPECAMERA_IDLE); while ((value&0x2FFFFFFF)&&(ctx->run_reader)) { usleep(IPECAMERA_NOFRAME_SLEEP); } - return 0; } #endif /* IPECAMERA_BUG_STUCKED_BUSY */ usleep(IPECAMERA_NOFRAME_SLEEP); |