From b15ef62a0f3d1ed4793ea8d8ca497b35236055ae Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 12 Apr 2011 21:30:39 +0200 Subject: Small bug fix: forgot to set a flag indicating what we are started --- ipecamera/image.c | 8 ++++++-- 1 file 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; } -- cgit v1.2.3