summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/idevice.c2
-rw-r--r--src/mobileactivation.c2
-rw-r--r--src/property_list_service.c6
3 files changed, 7 insertions, 3 deletions
diff --git a/src/idevice.c b/src/idevice.c
index b51f08c..18487aa 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -711,7 +711,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_
711 *recv_bytes = 0; 711 *recv_bytes = 0;
712 return IDEVICE_E_SSL_ERROR; 712 return IDEVICE_E_SSL_ERROR;
713 } 713 }
714 714
715 *recv_bytes = received; 715 *recv_bytes = received;
716 return IDEVICE_E_SUCCESS; 716 return IDEVICE_E_SUCCESS;
717 } 717 }
diff --git a/src/mobileactivation.c b/src/mobileactivation.c
index ea891b7..2de4333 100644
--- a/src/mobileactivation.c
+++ b/src/mobileactivation.c
@@ -264,7 +264,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation
264 plist_free(result); 264 plist_free(result);
265 result = NULL; 265 result = NULL;
266 266
267 return ret; 267 return ret;
268} 268}
269 269
270LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record) 270LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record)
diff --git a/src/property_list_service.c b/src/property_list_service.c
index f0fc830..7b5c738 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -224,6 +224,7 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
224 debug_info("received %d bytes", bytes); 224 debug_info("received %d bytes", bytes);
225 curlen += bytes; 225 curlen += bytes;
226 } 226 }
227
227 if (curlen < pktlen) { 228 if (curlen < pktlen) {
228 debug_info("received incomplete packet (%d of %d bytes)", curlen, pktlen); 229 debug_info("received incomplete packet (%d of %d bytes)", curlen, pktlen);
229 if (curlen > 0) { 230 if (curlen > 0) {
@@ -233,6 +234,7 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
233 free(content); 234 free(content);
234 return res; 235 return res;
235 } 236 }
237
236 if ((pktlen > 8) && !memcmp(content, "bplist00", 8)) { 238 if ((pktlen > 8) && !memcmp(content, "bplist00", 8)) {
237 plist_from_bin(content, pktlen, plist); 239 plist_from_bin(content, pktlen, plist);
238 } else if ((pktlen > 5) && !memcmp(content, "<?xml", 5)) { 240 } else if ((pktlen > 5) && !memcmp(content, "<?xml", 5)) {
@@ -246,15 +248,17 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
246 debug_info("WARNING: received unexpected non-plist content"); 248 debug_info("WARNING: received unexpected non-plist content");
247 debug_buffer(content, pktlen); 249 debug_buffer(content, pktlen);
248 } 250 }
251
249 if (*plist) { 252 if (*plist) {
250 debug_plist(*plist); 253 debug_plist(*plist);
251 res = PROPERTY_LIST_SERVICE_E_SUCCESS; 254 res = PROPERTY_LIST_SERVICE_E_SUCCESS;
252 } else { 255 } else {
253 res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR; 256 res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR;
254 } 257 }
258
255 free(content); 259 free(content);
256 content = NULL; 260 content = NULL;
257 261
258 return res; 262 return res;
259} 263}
260 264