From 9e777504d448e26ace9a56f509a13a1f8fbbcf55 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 11 Apr 2014 20:01:22 +0000 Subject: From: "Daniel P. Berrange" The agfa_capture method failed to check the error return value of the soundvision_send_command method. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14895 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/soundvision/agfa_cl18.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'camlibs/soundvision') diff --git a/camlibs/soundvision/agfa_cl18.c b/camlibs/soundvision/agfa_cl18.c index 514837cb4..535f317ef 100644 --- a/camlibs/soundvision/agfa_cl18.c +++ b/camlibs/soundvision/agfa_cl18.c @@ -33,9 +33,13 @@ int agfa_capture(CameraPrivateLibrary *dev, CameraFilePath *path) { int ret,taken; ret=soundvision_send_command(SOUNDVISION_SETPC1,0,dev); + if (ret < 0) return ret; ret=soundvision_send_command(SOUNDVISION_SETPC2,0,dev); + if (ret < 0) return ret; ret=soundvision_send_command(SOUNDVISION_TAKEPIC3,0,dev); + if (ret < 0) return ret; ret=soundvision_send_command(SOUNDVISION_SETPC2,0,dev); + if (ret < 0) return ret; /*Not sure if this delay is necessary, but it was used in the windows driver*/ /*delay(20); */ @@ -46,6 +50,7 @@ int agfa_capture(CameraPrivateLibrary *dev, CameraFilePath *path) { taken = soundvision_photos_taken(dev); /*This seems to do some kind of reset, but does cause the camera to start responding again*/ ret=soundvision_send_command(SOUNDVISION_GET_NAMES, 0, dev); + if (ret < 0) return ret; return GP_OK; } -- cgit v1.2.1