From 2eaf405e95af67d9cfabf07c8666fcc2c71e476a Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Thu, 27 Jun 2002 11:09:31 +0000 Subject: [PATCH] =?UTF-8?q?2002-06-27=20=20Lutz=20M=EF=BF=BDller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * sierra-usbwrap.c: I missed one < GP_OK. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4778 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/sierra/ChangeLog | 4 ++++ camlibs/sierra/sierra-usbwrap.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/camlibs/sierra/ChangeLog b/camlibs/sierra/ChangeLog index b57fa0e3e..c0fef2d0d 100644 --- a/camlibs/sierra/ChangeLog +++ b/camlibs/sierra/ChangeLog @@ -1,3 +1,7 @@ +2002-06-27 Lutz Müller + + * sierra-usbwrap.c: I missed one < GP_OK. + 2002-06-27 Lutz Müller Selmeczi David fixed the error checks. I added diff --git a/camlibs/sierra/sierra-usbwrap.c b/camlibs/sierra/sierra-usbwrap.c index d1e1ba2ab..4a23c9cba 100644 --- a/camlibs/sierra/sierra-usbwrap.c +++ b/camlibs/sierra/sierra-usbwrap.c @@ -41,6 +41,8 @@ #include #include +#include <_stdint.h> + #include #include @@ -405,7 +407,7 @@ usb_wrap_DATA (GPPort *dev, char *sierra_response, int *sierra_len, uw32_t size) hdr.length = uw_value(msg_len); hdr.request_type = UW_REQUEST_DATA; - if (gp_port_write(dev, (char*)&hdr, sizeof(hdr)) != GP_OK || + if (gp_port_write(dev, (char*)&hdr, sizeof(hdr)) < GP_OK || gp_port_read(dev, (char*)msg, msg_len) != msg_len) { GP_DEBUG( "usb_wrap_DATA FAILED" );