diff options
| author | 2010-01-12 19:09:36 +0100 | |
|---|---|---|
| committer | 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, | |||
| 77 | /* perform handshake */ | 77 | /* perform handshake */ |
| 78 | ret = mobilesync_error(device_link_service_version_exchange(dlclient, MSYNC_VERSION_INT1, MSYNC_VERSION_INT2)); | 78 | ret = mobilesync_error(device_link_service_version_exchange(dlclient, MSYNC_VERSION_INT1, MSYNC_VERSION_INT2)); |
| 79 | if (ret != MOBILESYNC_E_SUCCESS) { | 79 | if (ret != MOBILESYNC_E_SUCCESS) { |
| 80 | log_debug_msg("%s: version exchange failed, error %d\n", __func__, ret); | 80 | debug_info("version exchange failed, error %d", ret); |
| 81 | mobilesync_client_free(client_loc); | 81 | mobilesync_client_free(client_loc); |
| 82 | return ret; | 82 | return ret; |
| 83 | } | 83 | } |
| @@ -116,7 +116,7 @@ mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t * plist) | |||
| 116 | char *XMLContent = NULL; | 116 | char *XMLContent = NULL; |
| 117 | uint32_t length = 0; | 117 | uint32_t length = 0; |
| 118 | plist_to_xml(*plist, &XMLContent, &length); | 118 | plist_to_xml(*plist, &XMLContent, &length); |
| 119 | log_debug_msg("%s: plist size: %i\nbuffer :\n%s\n", __func__, length, XMLContent); | 119 | debug_info("plist size: %i\nbuffer :\n%s", length, XMLContent); |
| 120 | free(XMLContent); | 120 | free(XMLContent); |
| 121 | #endif | 121 | #endif |
| 122 | return ret; | 122 | return ret; |
| @@ -141,7 +141,7 @@ mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) | |||
| 141 | char *XMLContent = NULL; | 141 | char *XMLContent = NULL; |
| 142 | uint32_t length = 0; | 142 | uint32_t length = 0; |
| 143 | plist_to_xml(plist, &XMLContent, &length); | 143 | plist_to_xml(plist, &XMLContent, &length); |
| 144 | log_debug_msg("%s: plist size: %i\nbuffer :\n%s\n", __func__, length, XMLContent); | 144 | debug_info("plist size: %i\nbuffer :\n%s", length, XMLContent); |
| 145 | free(XMLContent); | 145 | free(XMLContent); |
| 146 | #endif | 146 | #endif |
| 147 | return mobilesync_error(device_link_service_send(client->parent, plist)); | 147 | return mobilesync_error(device_link_service_send(client->parent, plist)); |
