From 6f07a0bb701d6236dda7b19bd04df6414708dc78 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 24 Mar 2010 14:56:02 +0100 Subject: Use glib GUINT32_TO/FROM_BE macros instead of htonl/ntohl --- src/property_list_service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/property_list_service.c') diff --git a/src/property_list_service.c b/src/property_list_service.c index eaf0b30..80b5f52 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c @@ -20,7 +20,7 @@ */ #include #include -#include +#include #include "property_list_service.h" #include "idevice.h" @@ -138,7 +138,7 @@ static property_list_service_error_t internal_plist_send(property_list_service_c return PROPERTY_LIST_SERVICE_E_PLIST_ERROR; } - nlen = htonl(length); + nlen = GUINT32_TO_BE(length); debug_info("sending %d bytes", length); idevice_connection_send(client->connection, (const char*)&nlen, sizeof(nlen), (uint32_t*)&bytes); if (bytes == sizeof(nlen)) { @@ -229,7 +229,7 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis if ((char)pktlen == 0) { /* prevent huge buffers */ uint32_t curlen = 0; char *content = NULL; - pktlen = ntohl(pktlen); + pktlen = GUINT32_FROM_BE(pktlen); debug_info("%d bytes following", pktlen); content = (char*)malloc(pktlen); -- cgit v1.1-32-gdbae