summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-12 21:30:39 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-12 21:30:39 +0200
commitb15ef62a0f3d1ed4793ea8d8ca497b35236055ae (patch)
treeb3b3c13585958a9e9a66d355211a453b054f3fd4
parentda6efcc5063d24791edbda5dc2324e4ca711fec5 (diff)
downloadipecamera-b15ef62a0f3d1ed4793ea8d8ca497b35236055ae.tar.gz
ipecamera-b15ef62a0f3d1ed4793ea8d8ca497b35236055ae.tar.bz2
ipecamera-b15ef62a0f3d1ed4793ea8d8ca497b35236055ae.tar.xz
ipecamera-b15ef62a0f3d1ed4793ea8d8ca497b35236055ae.zip
Small bug fix: forgot to set a flag indicating what we are started
-rw-r--r--ipecamera/image.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ipecamera/image.c b/ipecamera/image.c
index 969071d..d6fe185 100644
--- a/ipecamera/image.c
+++ b/ipecamera/image.c
@@ -271,6 +271,8 @@ int ipecamera_start(void *vctx, pcilib_event_t event_mask, pcilib_callback_t cb,
return err;
}
+ ctx->started = 1;
+
return 0;
}
@@ -283,6 +285,8 @@ int ipecamera_stop(void *vctx) {
return PCILIB_ERROR_NOTINITIALIZED;
}
+ ctx->started = 0;
+
if (ctx->buffer) {
free(ctx->buffer);
ctx->buffer = NULL;
@@ -295,8 +299,8 @@ int ipecamera_stop(void *vctx) {
ctx->event_id = 0;
- ctx->buf_ptr = 0;
-
+ ctx->buf_ptr = 0;
+
return 0;
}