summaryrefslogtreecommitdiff
path: root/libgphoto2/gphoto2-camera.c
diff options
context:
space:
mode:
authorPatrick Mansfield <patman@aracnet.com>2003-11-17 06:28:32 +0000
committerPatrick Mansfield <patman@aracnet.com>2003-11-17 06:28:32 +0000
commit5c60163efe1861b3f29684d7663c491671118f4a (patch)
treec05aef49cf7b40161179bed885ce127093f25357 /libgphoto2/gphoto2-camera.c
parent47b02247826001e15987dcb12b7836208d95aca0 (diff)
downloadlibgphoto2-5c60163efe1861b3f29684d7663c491671118f4a.tar.gz
Return GP_ERROR_CAMERA_BUSY if a command or I/O is in progress.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6924 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2/gphoto2-camera.c')
-rw-r--r--libgphoto2/gphoto2-camera.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c
index f0227a7c3..51b5e0280 100644
--- a/libgphoto2/gphoto2-camera.c
+++ b/libgphoto2/gphoto2-camera.c
@@ -221,6 +221,8 @@
#define CHECK_INIT(c,ctx) \
{ \
+ if ((c)->pc->used) \
+ return (GP_ERROR_CAMERA_BUSY); \
(c)->pc->used++; \
if (!(c)->pc->lh) \
CR((c), gp_camera_init (c, ctx), ctx); \