summaryrefslogtreecommitdiffstats
path: root/src/afc.c
diff options
context:
space:
mode:
authorGravatar Marty Rosenberg2010-08-27 01:20:00 +0200
committerGravatar Nikias Bassen2010-08-27 01:20:00 +0200
commit52e717b63544b83855b9f0016888094d9c6bc683 (patch)
tree0ffd8fae4e32e1e611d02500df96ffb534cdc0c2 /src/afc.c
parent1abb0a0af82f7433197ba4183aeb08b60d70453a (diff)
downloadlibimobiledevice-52e717b63544b83855b9f0016888094d9c6bc683.tar.gz
libimobiledevice-52e717b63544b83855b9f0016888094d9c6bc683.tar.bz2
afc: fix packet communication on big endian machines
Diffstat (limited to 'src/afc.c')
-rw-r--r--src/afc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afc.c b/src/afc.c
index 555a574..93131e1 100644
--- a/src/afc.c
+++ b/src/afc.c
@@ -176,6 +176,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui
AFCPacket_to_LE(client->afc_packet);
sent = 0;
idevice_connection_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent);
+ AFCPacket_from_LE(client->afc_packet);
if (sent == 0) {
/* FIXME: should this be handled as success?! */
return AFC_E_SUCCESS;
@@ -210,6 +211,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui
AFCPacket_to_LE(client->afc_packet);
sent = 0;
idevice_connection_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent);
+ AFCPacket_from_LE(client->afc_packet);
if (sent == 0) {
return AFC_E_SUCCESS;
}