diff options
author | Martin Szulecki | 2010-01-12 19:09:36 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-01-12 19:09:36 +0100 |
commit | 342f4e929888c0aaa088e39fb98a74957bf45fa7 (patch) | |
tree | 905bafb1b353b8ac21e3fb1f9c773d218a5c878e /src/MobileSync.c | |
parent | bf3dc421b2b5ccfe2fcd3cd4ec1ef90f39599600 (diff) | |
download | libimobiledevice-342f4e929888c0aaa088e39fb98a74957bf45fa7.tar.gz libimobiledevice-342f4e929888c0aaa088e39fb98a74957bf45fa7.tar.bz2 |
Refactor and unify internal debug system for ease of use and verbosity
This introduces a new debug_info macro which automatically prints
the calling function, file and line number information instead of
having that information passed to every old log_debug_msg call.
Diffstat (limited to 'src/MobileSync.c')
-rw-r--r-- | src/MobileSync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MobileSync.c b/src/MobileSync.c index ef3571a..97a1320 100644 --- a/src/MobileSync.c +++ b/src/MobileSync.c @@ -77,7 +77,7 @@ mobilesync_error_t mobilesync_client_new(iphone_device_t device, int dst_port, /* perform handshake */ ret = mobilesync_error(device_link_service_version_exchange(dlclient, MSYNC_VERSION_INT1, MSYNC_VERSION_INT2)); if (ret != MOBILESYNC_E_SUCCESS) { - log_debug_msg("%s: version exchange failed, error %d\n", __func__, ret); + debug_info("version exchange failed, error %d", ret); mobilesync_client_free(client_loc); return ret; } @@ -116,7 +116,7 @@ mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t * plist) char *XMLContent = NULL; uint32_t length = 0; plist_to_xml(*plist, &XMLContent, &length); - log_debug_msg("%s: plist size: %i\nbuffer :\n%s\n", __func__, length, XMLContent); + debug_info("plist size: %i\nbuffer :\n%s", length, XMLContent); free(XMLContent); #endif return ret; @@ -141,7 +141,7 @@ mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) char *XMLContent = NULL; uint32_t length = 0; plist_to_xml(plist, &XMLContent, &length); - log_debug_msg("%s: plist size: %i\nbuffer :\n%s\n", __func__, length, XMLContent); + debug_info("plist size: %i\nbuffer :\n%s", length, XMLContent); free(XMLContent); #endif return mobilesync_error(device_link_service_send(client->parent, plist)); |