summaryrefslogtreecommitdiffstats
path: root/src/property_list_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/property_list_service.c')
-rw-r--r--src/property_list_service.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c
index b549cb4..e39c7bb 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -142,7 +142,7 @@ static property_list_service_error_t internal_plist_send(property_list_service_c
142 } 142 }
143 143
144 nlen = htonl(length); 144 nlen = htonl(length);
145 log_debug_msg("%s: sending %d bytes\n", __func__, length); 145 debug_info("sending %d bytes", length);
146 if (ssl_session) { 146 if (ssl_session) {
147 bytes = gnutls_record_send(ssl_session, (const char*)&nlen, sizeof(nlen)); 147 bytes = gnutls_record_send(ssl_session, (const char*)&nlen, sizeof(nlen));
148 } else { 148 } else {
@@ -155,17 +155,17 @@ static property_list_service_error_t internal_plist_send(property_list_service_c
155 iphone_device_send(client->connection, content, length, (uint32_t*)&bytes); 155 iphone_device_send(client->connection, content, length, (uint32_t*)&bytes);
156 } 156 }
157 if (bytes > 0) { 157 if (bytes > 0) {
158 log_debug_msg("%s: sent %d bytes\n", __func__, bytes); 158 debug_info("sent %d bytes", bytes);
159 log_debug_buffer(content, bytes); 159 debug_buffer(content, bytes);
160 if ((uint32_t)bytes == length) { 160 if ((uint32_t)bytes == length) {
161 res = PROPERTY_LIST_SERVICE_E_SUCCESS; 161 res = PROPERTY_LIST_SERVICE_E_SUCCESS;
162 } else { 162 } else {
163 log_debug_msg("%s: ERROR: Could not send all data (%d of %d)!\n", __func__, bytes, length); 163 debug_info("ERROR: Could not send all data (%d of %d)!", bytes, length);
164 } 164 }
165 } 165 }
166 } 166 }
167 if (bytes <= 0) { 167 if (bytes <= 0) {
168 log_debug_msg("%s: ERROR: sending to device failed.\n", __func__); 168 debug_info("ERROR: sending to device failed.");
169 } 169 }
170 170
171 free(content); 171 free(content);
@@ -274,16 +274,16 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s
274 } else { 274 } else {
275 iphone_device_recv_timeout(client->connection, (char*)&pktlen, sizeof(pktlen), &bytes, timeout); 275 iphone_device_recv_timeout(client->connection, (char*)&pktlen, sizeof(pktlen), &bytes, timeout);
276 } 276 }
277 log_debug_msg("%s: initial read=%i\n", __func__, bytes); 277 debug_info("initial read=%i", bytes);
278 if (bytes < 4) { 278 if (bytes < 4) {
279 log_debug_msg("%s: initial read failed!\n", __func__); 279 debug_info("initial read failed!");
280 return PROPERTY_LIST_SERVICE_E_MUX_ERROR; 280 return PROPERTY_LIST_SERVICE_E_MUX_ERROR;
281 } else { 281 } else {
282 if ((char)pktlen == 0) { /* prevent huge buffers */ 282 if ((char)pktlen == 0) { /* prevent huge buffers */
283 uint32_t curlen = 0; 283 uint32_t curlen = 0;
284 char *content = NULL; 284 char *content = NULL;
285 pktlen = ntohl(pktlen); 285 pktlen = ntohl(pktlen);
286 log_debug_msg("%s: %d bytes following\n", __func__, pktlen); 286 debug_info("%d bytes following", pktlen);
287 content = (char*)malloc(pktlen); 287 content = (char*)malloc(pktlen);
288 288
289 while (curlen < pktlen) { 289 while (curlen < pktlen) {
@@ -296,10 +296,10 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s
296 res = PROPERTY_LIST_SERVICE_E_MUX_ERROR; 296 res = PROPERTY_LIST_SERVICE_E_MUX_ERROR;
297 break; 297 break;
298 } 298 }
299 log_debug_msg("%s: received %d bytes\n", __func__, bytes); 299 debug_info("received %d bytes", bytes);
300 curlen += bytes; 300 curlen += bytes;
301 } 301 }
302 log_debug_buffer(content, pktlen); 302 debug_buffer(content, pktlen);
303 if (!memcmp(content, "bplist00", 8)) { 303 if (!memcmp(content, "bplist00", 8)) {
304 plist_from_bin(content, pktlen, plist); 304 plist_from_bin(content, pktlen, plist);
305 } else { 305 } else {