diff options
| author | 2010-01-13 01:22:50 +0100 | |
|---|---|---|
| committer | 2010-01-13 01:22:50 +0100 | |
| commit | 4f187cfbf2598635295365e647b5032ab11a2cba (patch) | |
| tree | ea7349ebb2293b5636bbfc96b541727d8534f87d | |
| parent | 8e04b4036e9328b50c4bd308f6f0498972b7e84f (diff) | |
| download | libimobiledevice-4f187cfbf2598635295365e647b5032ab11a2cba.tar.gz libimobiledevice-4f187cfbf2598635295365e647b5032ab11a2cba.tar.bz2 | |
Use debug_plist() to print xml plists instead of binary buffers
| -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  inline void debug_plist(plist_t plist)  { +#ifndef STRIP_DEBUG_CODE  	if (!plist)  		return; @@ -145,5 +146,6 @@ inline void debug_plist(plist_t plist)  	plist_to_xml(plist, &buffer, &length);  	debug_info("plist size: %i\nbuffer :\n%s", length, buffer);  	free(buffer); +#endif  } 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  		iphone_device_send(client->connection, content, length, (uint32_t*)&bytes);  		if (bytes > 0) {  			debug_info("sent %d bytes", bytes); -			debug_buffer(content, bytes); +			debug_plist(plist);  			if ((uint32_t)bytes == length) {  				res = PROPERTY_LIST_SERVICE_E_SUCCESS;  			} else { @@ -243,13 +243,13 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s  				debug_info("received %d bytes", bytes);  				curlen += bytes;  			} -			debug_buffer(content, pktlen);  			if (!memcmp(content, "bplist00", 8)) {  				plist_from_bin(content, pktlen, plist);  			} else {  				plist_from_xml(content, pktlen, plist);  			}  			if (*plist) { +				debug_plist(*plist);  				res = PROPERTY_LIST_SERVICE_E_SUCCESS;  			} else {  				res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR; | 
