From 2fafb29bd7830c8aecd0abb65c56e42caf0e48c2 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 25 Mar 2010 12:49:42 +0000 Subject: [PATCH] more debugging in here git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12845 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/sierra/sierra-usbwrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/camlibs/sierra/sierra-usbwrap.c b/camlibs/sierra/sierra-usbwrap.c index 2ccf2905a..80b0502c9 100644 --- a/camlibs/sierra/sierra-usbwrap.c +++ b/camlibs/sierra/sierra-usbwrap.c @@ -222,7 +222,7 @@ usb_wrap_OK (GPPort *dev, uw_header_t *hdr, unsigned int type) if ((ret = gp_port_read(dev, (char*)&rsp, sizeof(rsp))) != sizeof(rsp)) { - GP_DEBUG( "gp_port_read *** FAILED" ); + gp_log (GP_LOG_DEBUG, GP_MODULE, "gp_port_read *** FAILED (%d vs %d bytes)", (int)sizeof(rsp), ret ); if (ret < GP_OK) return ret; return GP_ERROR; @@ -245,7 +245,7 @@ usb_wrap_OK (GPPort *dev, uw_header_t *hdr, unsigned int type) rsp.zero[3] != 0 || rsp.zero[4] != 0) { - GP_DEBUG( "error: **** usb_wrap_OK failed" ); + GP_DEBUG( "error: **** usb_wrap_OK failed - not all expected zero bytes are 0" ); return GP_ERROR; } return GP_OK; @@ -360,7 +360,7 @@ usb_wrap_CMND(gp_port* dev, unsigned int type, char* sierra_msg, int sierra_len) msg->packet_type = UW_PACKET_DATA; memcpy((char*)msg + sizeof(*msg), sierra_msg, sierra_len); GP_DEBUG( "usb_wrap_CMND writing %i + %i", - sizeof(hdr), msg_len); + (int)sizeof(hdr), msg_len); if ((ret=gp_port_write(dev, (char*)&hdr, sizeof(hdr))) < GP_OK || (ret=gp_port_write(dev, (char*)msg, msg_len)) < GP_OK)