summaryrefslogtreecommitdiffstats
path: root/src/property_list_service.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2020-06-08 21:24:24 +0200
committerGravatar Martin Szulecki2020-06-08 21:24:24 +0200
commit296a294ab114ff49dcf7717c5a0d7d55ab39825a (patch)
tree47986e105bbd9e00beb0a6e50c17ea452b07ec34 /src/property_list_service.c
parentc591499b041b2a692dcd0b22b5952174caed47a1 (diff)
downloadlibimobiledevice-296a294ab114ff49dcf7717c5a0d7d55ab39825a.tar.gz
libimobiledevice-296a294ab114ff49dcf7717c5a0d7d55ab39825a.tar.bz2
Remove whitespace errors from all files
Diffstat (limited to 'src/property_list_service.c')
-rw-r--r--src/property_list_service.c6
1 files changed, 5 insertions, 1 deletions
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
debug_info("received %d bytes", bytes);
curlen += bytes;
}
+
if (curlen < pktlen) {
debug_info("received incomplete packet (%d of %d bytes)", curlen, pktlen);
if (curlen > 0) {
@@ -233,6 +234,7 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
free(content);
return res;
}
+
if ((pktlen > 8) && !memcmp(content, "bplist00", 8)) {
plist_from_bin(content, pktlen, plist);
} else if ((pktlen > 5) && !memcmp(content, "<?xml", 5)) {
@@ -246,15 +248,17 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
debug_info("WARNING: received unexpected non-plist content");
debug_buffer(content, pktlen);
}
+
if (*plist) {
debug_plist(*plist);
res = PROPERTY_LIST_SERVICE_E_SUCCESS;
} else {
res = PROPERTY_LIST_SERVICE_E_PLIST_ERROR;
}
+
free(content);
content = NULL;
-
+
return res;
}