diff options
Diffstat (limited to 'camlibs/canon')
-rw-r--r-- | camlibs/canon/canon.c | 23 | ||||
-rw-r--r-- | camlibs/canon/serial.c | 22 | ||||
-rw-r--r-- | camlibs/canon/usb.c | 6 |
3 files changed, 18 insertions, 33 deletions
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c index 0bcf6e89a..da9444d4c 100644 --- a/camlibs/canon/canon.c +++ b/camlibs/canon/canon.c @@ -1686,10 +1686,9 @@ canon_int_set_file_attributes (Camera *camera, const char *file, const char *dir return GP_ERROR_CORRUPTED_DATA; } - gp_log (GP_LOG_DATA, "canon/canon.c", - "canon_int_set_file_attributes: returned four bytes as expected, " - "we should check if they indicate error or not. Returned data :"); - gp_log_data ("canon", (char *)msg, 4); + GP_LOG_DATA ((char *)msg, 4, + "canon_int_set_file_attributes: returned four bytes as expected, " + "we should check if they indicate error or not. Returned data:"); return GP_OK; } @@ -3292,11 +3291,9 @@ canon_int_list_directory (Camera *camera, const char *folder, CameraList *list, } /* 10 bytes of attributes, size and date, a name and a NULL terminating byte */ - /* don't use GP_DEBUG since we log this with GP_LOG_DATA */ - gp_log (GP_LOG_DATA, "canon/canon.c", - "canon_int_list_directory: dirent determined to be %li=0x%lx bytes :", - (long)dirent_ent_size, (long)dirent_ent_size); - gp_log_data ("canon", (char *)pos, dirent_ent_size); + GP_LOG_DATA ((char *)pos, dirent_ent_size, + "canon_int_list_directory: dirent determined to be %li=0x%lx bytes :", + (long)dirent_ent_size, (long)dirent_ent_size); if (dirent_name_len) { /* OK, this directory entry has a name in it. */ @@ -3858,11 +3855,9 @@ canon_int_get_info_func (Camera *camera, const char *folder, } /* 10 bytes of attributes, size and date, a name and a NULL terminating byte */ - /* don't use GP_DEBUG since we log this with GP_LOG_DATA */ - gp_log (GP_LOG_DATA, "canon/canon.c", - "canon_int_get_info_func: dirent determined to be %li=0x%lx bytes :", - (long)dirent_ent_size, (long)dirent_ent_size); - gp_log_data ("canon", (char *)pos, dirent_ent_size); + GP_LOG_DATA ((char *)pos, dirent_ent_size, + "canon_int_get_info_func: dirent determined to be %li=0x%lx bytes:", + (long)dirent_ent_size, (long)dirent_ent_size); if (dirent_name_len) { /* OK, this directory entry has a name in it. */ diff --git a/camlibs/canon/serial.c b/camlibs/canon/serial.c index 2602fc857..de99a9a45 100644 --- a/camlibs/canon/serial.c +++ b/camlibs/canon/serial.c @@ -338,11 +338,7 @@ canon_serial_recv_frame (Camera *camera, int *len) *p++ = c; } - /* If you don't want to see the data dumped, change the frontend to - * set a lower debug level - */ - gp_log (GP_LOG_DATA, "canon", "RECV (without CANON_FBEG and CANON_FEND bytes)"); - gp_log_data ("canon", (char *)buffer, p - buffer); + GP_LOG_DATA ((char *)buffer, p - buffer, "RECV (without CANON_FBEG and CANON_FEND bytes)"); if (len) *len = p - buffer; @@ -1139,11 +1135,9 @@ canon_serial_get_dirents (Camera *camera, unsigned char **dirent_data, return GP_ERROR; } - /* don't use GP_DEBUG since we log this with GP_LOG_DATA */ - gp_log (GP_LOG_DATA, "canon", - "canon_serial_get_dirents: " - "dirent packet received from canon_serial_dialogue:"); - gp_log_data ("canon", (char *)p, *dirents_length); + GP_LOG_DATA ((char *)p, *dirents_length, + "canon_serial_get_dirents: " + "dirent packet received from canon_serial_dialogue:"); /* the first five bytes is only for the RS232 implementation * of this command, we do not need to copy them so therefore @@ -1180,11 +1174,9 @@ canon_serial_get_dirents (Camera *camera, unsigned char **dirent_data, return GP_ERROR; } - /* don't use GP_DEBUG since we log this with GP_LOG_DATA */ - gp_log (GP_LOG_DATA, "canon", - "canon_serial_get_dirents: " - "dirent packet received from canon_serial_recv_msg:"); - gp_log_data ("canon", (char *)p, *dirents_length); + GP_LOG_DATA ((char *)p, *dirents_length, + "canon_serial_get_dirents: " + "dirent packet received from canon_serial_recv_msg:"); /* the first five bytes is only for the RS232 implementation, * don't count them when checking dirent size diff --git a/camlibs/canon/usb.c b/camlibs/canon/usb.c index 6c38c5497..ddc04565a 100644 --- a/camlibs/canon/usb.c +++ b/camlibs/canon/usb.c @@ -1431,10 +1431,8 @@ canon_usb_dialogue_full (Camera *camera, canonCommandIndex canon_funct, unsigned return NULL; } - if (payload_length) { - GP_DEBUG ("Payload :"); - gp_log_data ("canon", (char *)payload, (long)payload_length); - } + if (payload_length) + GP_LOG_DATA ((char *)payload, (long)payload_length, "Payload:"); if ((payload_length + 0x50) > sizeof (packet)) { gp_log (GP_LOG_DEBUG, "canon/usb.c", |