From: <mar...@us...> - 2015-07-16 08:12:40
|
Revision: 15496 http://sourceforge.net/p/gphoto/code/15496 Author: marcusmeissner Date: 2015-07-16 08:12:37 +0000 (Thu, 16 Jul 2015) Log Message: ----------- From: Axel Waggershauser <aw...@we...> 1) minor cosmetic printing improvements * consistent upper-case spelling * replace "Sending PTP_OC 0xabcd / Do someting request..." with "Sending PTP_OC 0xabcd (Do something) request...", as I think this improves readability by separating the translation from the "request" string. The code already uses this ()-style elsewhere. * also print the new string in the missing "Reading PTP_OC 0xabcd response..." case Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/ptp.c trunk/libgphoto2/camlibs/ptp2/usb.c Modified: trunk/libgphoto2/camlibs/ptp2/ptp.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/ptp.c 2015-07-14 19:19:10 UTC (rev 15495) +++ trunk/libgphoto2/camlibs/ptp2/ptp.c 2015-07-16 08:12:37 UTC (rev 15496) @@ -5652,7 +5652,7 @@ const char *name; } ptp_opcode_trans[] = { {PTP_OC_Undefined,N_("Undefined")}, - {PTP_OC_GetDeviceInfo,N_("get device info")}, + {PTP_OC_GetDeviceInfo,N_("Get device info")}, {PTP_OC_OpenSession,N_("Open session")}, {PTP_OC_CloseSession,N_("Close session")}, {PTP_OC_GetStorageIDs,N_("Get storage IDs")}, Modified: trunk/libgphoto2/camlibs/ptp2/usb.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/usb.c 2015-07-14 19:19:10 UTC (rev 15495) +++ trunk/libgphoto2/camlibs/ptp2/usb.c 2015-07-16 08:12:37 UTC (rev 15496) @@ -79,7 +79,7 @@ char buf[100]; ptp_render_opcode(params, req->Code, sizeof(buf),buf); - GP_LOG_D ("Sending PTP_OC 0x%0x / %s request...", req->Code, buf); + GP_LOG_D ("Sending PTP_OC 0x%0x (%s) request...", req->Code, buf); /* build appropriate USB container */ usbreq.length=htod32(PTP_USB_BULK_REQ_LEN- @@ -128,7 +128,7 @@ char buf[100]; ptp_render_opcode(params, ptp->Code, sizeof(buf),buf); - GP_LOG_D ("Sending PTP_OC 0x%0x / %s data...", ptp->Code, buf); + GP_LOG_D ("Sending PTP_OC 0x%0x (%s) data...", ptp->Code, buf); /* build appropriate USB container */ usbdata.length = htod32(PTP_USB_BULK_HDR_LEN+size); usbdata.type = htod16(PTP_USB_CONTAINER_DATA); @@ -261,7 +261,7 @@ char buf[100]; ptp_render_opcode(params, ptp->Code, sizeof(buf),buf); - GP_LOG_D ("Reading PTP_OC 0x%0x / %s data...", ptp->Code, buf); + GP_LOG_D ("Reading PTP_OC 0x%0x (%s) data...", ptp->Code, buf); PTP_CNT_INIT(usbdata); ret = ptp_usb_getpacket (params, &usbdata, &bytes_read); @@ -415,8 +415,10 @@ uint32_t rlen; PTPUSBBulkContainer usbresp; /*GPContext *context = ((PTPData *)params->data)->context;*/ + char buf[100]; - GP_LOG_D ("Reading PTP_OC 0x%0x response...", resp->Code); + ptp_render_opcode(params, resp->Code, sizeof(buf),buf); + GP_LOG_D ("Reading PTP_OC 0x%0x (%s) response...", resp->Code, buf); PTP_CNT_INIT(usbresp); /* read response, it should never be longer than sizeof(usbresp) */ ret = ptp_usb_getpacket(params, &usbresp, &rlen); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |