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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c
index 8af958e..47b119f 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -20,7 +20,6 @@
20 */ 20 */
21#include <stdlib.h> 21#include <stdlib.h>
22#include <string.h> 22#include <string.h>
23#include <glib.h>
24 23
25#include "property_list_service.h" 24#include "property_list_service.h"
26#include "idevice.h" 25#include "idevice.h"
@@ -138,7 +137,7 @@ static property_list_service_error_t internal_plist_send(property_list_service_c
138 return PROPERTY_LIST_SERVICE_E_PLIST_ERROR; 137 return PROPERTY_LIST_SERVICE_E_PLIST_ERROR;
139 } 138 }
140 139
141 nlen = GUINT32_TO_BE(length); 140 nlen = htobe32(length);
142 debug_info("sending %d bytes", length); 141 debug_info("sending %d bytes", length);
143 idevice_connection_send(client->connection, (const char*)&nlen, sizeof(nlen), (uint32_t*)&bytes); 142 idevice_connection_send(client->connection, (const char*)&nlen, sizeof(nlen), (uint32_t*)&bytes);
144 if (bytes == sizeof(nlen)) { 143 if (bytes == sizeof(nlen)) {
@@ -226,7 +225,7 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
226 debug_info("initial read failed!"); 225 debug_info("initial read failed!");
227 return PROPERTY_LIST_SERVICE_E_MUX_ERROR; 226 return PROPERTY_LIST_SERVICE_E_MUX_ERROR;
228 } else { 227 } else {
229 pktlen = GUINT32_FROM_BE(pktlen); 228 pktlen = be32toh(pktlen);
230 if (pktlen < (1 << 24)) { /* prevent huge buffers */ 229 if (pktlen < (1 << 24)) { /* prevent huge buffers */
231 uint32_t curlen = 0; 230 uint32_t curlen = 0;
232 char *content = NULL; 231 char *content = NULL;