diff options
| -rw-r--r-- | src/debug.c | 2 | ||||
| -rw-r--r-- | src/property_list_service.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/debug.c b/src/debug.c index 9b8d3f1..2cdeebf 100644 --- a/src/debug.c +++ b/src/debug.c | |||
| @@ -137,6 +137,7 @@ inline void debug_buffer_to_file(const char *file, const char *data, const int l | |||
| 137 | 137 | ||
| 138 | inline void debug_plist(plist_t plist) | 138 | inline void debug_plist(plist_t plist) |
| 139 | { | 139 | { |
| 140 | #ifndef STRIP_DEBUG_CODE | ||
| 140 | if (!plist) | 141 | if (!plist) |
| 141 | return; | 142 | return; |
| 142 | 143 | ||
| @@ -145,5 +146,6 @@ inline void debug_plist(plist_t plist) | |||
| 145 | plist_to_xml(plist, &buffer, &length); | 146 | plist_to_xml(plist, &buffer, &length); |
| 146 | debug_info("plist size: %i\nbuffer :\n%s", length, buffer); | 147 | debug_info("plist size: %i\nbuffer :\n%s", length, buffer); |
| 147 | free(buffer); | 148 | free(buffer); |
| 149 | #endif | ||
| 148 | } | 150 | } |
| 149 | 151 | ||
diff --git a/src/property_list_service.c b/src/property_list_service.c index b4c2f44..852ed9c 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c | |||
| @@ -146,7 +146,7 @@ static property_list_service_error_t internal_plist_send(property_list_service_c | |||
| 146 | iphone_device_send(client->connection, content, length, (uint32_t*)&bytes); | 146 | iphone_device_send(client->connection, content, length, (uint32_t*)&bytes); |
| 147 | if (bytes > 0) { | 147 | if (bytes > 0) { |
| 148 | debug_info("sent %d bytes", bytes); | 148 | debug_info("sent %d bytes", bytes); |
| 149 | debug_buffer(content, bytes); | 149 | debug_plist(plist); |
| 150 | if ((uint32_t)bytes == length) { | 150 | if ((uint32_t)bytes == length) { |
| 151 | res = PROPERTY_LIST_SERVICE_E_SUCCESS; | 151 | res = PROPERTY_LIST_SERVICE_E_SUCCESS; |
| 152 | } else { | 152 | } else { |
| @@ -243,13 +243,13 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s | |||
| 243 | debug_info("received %d bytes", bytes); | 243 | debug_info("received %d bytes", bytes); |
| 244 | curlen += bytes; | 244 | curlen += bytes; |
| 245 | } | 245 | } |
| 246 | debug_buffer(content, pktlen); | ||
| 247 | if (!memcmp(content, "bplist00", 8)) { | 246 | if (!memcmp(content, "bplist00", 8)) { |
| 248 | plist_from_bin(content, pktlen, plist); | 247 | plist_from_bin(content, pktlen, plist); |
| 249 | } else { | 248 | } else { |
| 250 | plist_from_xml(content, pktlen, plist); | 249 | plist_from_xml(content, pktlen, plist); |
| 251 | } | 250 | } |
| 252 | if (*plist) { | 251 | if (*plist) { |
| 252 | debug_plist(*plist); | ||
| 253 | res = PROPERTY_LIST_SERVICE_E_SUCCESS; | 253 | res = PROPERTY_LIST_SERVICE_E_SUCCESS; |
| 254 | } else { | 254 | } else { |
| 255 | res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR; | 255 | res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR; |
