summaryrefslogtreecommitdiffstats
path: root/src/mobilebackup2.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-02-26 17:24:23 +0100
committerGravatar Martin Szulecki2013-02-27 16:18:15 +0100
commitf8066bbf5169b7d7e68771bce677355e33a595c1 (patch)
tree8e8ee0a82c3a363c171c7124884af80a68e7cd08 /src/mobilebackup2.c
parentca23188eaab07d744e9cf85d9bf69ed323e94186 (diff)
downloadlibimobiledevice-f8066bbf5169b7d7e68771bce677355e33a595c1.tar.gz
libimobiledevice-f8066bbf5169b7d7e68771bce677355e33a595c1.tar.bz2
implement base service that all other services inherit from
Diffstat (limited to 'src/mobilebackup2.c')
-rw-r--r--src/mobilebackup2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c
index bcf5944..15ba469 100644
--- a/src/mobilebackup2.c
+++ b/src/mobilebackup2.c
@@ -279,13 +279,13 @@ mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, cons
*bytes = 0;
- idevice_connection_t conn = client->parent->parent->connection;
+ service_client_t raw = client->parent->parent->parent;
int bytes_loc = 0;
uint32_t sent = 0;
do {
bytes_loc = 0;
- idevice_connection_send(conn, data+sent, length-sent, (uint32_t*)&bytes_loc);
+ service_send(raw, data+sent, length-sent, (uint32_t*)&bytes_loc);
if (bytes_loc <= 0)
break;
sent += bytes_loc;
@@ -321,7 +321,7 @@ mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, c
if (!client || !client->parent || !data || (length == 0) || !bytes)
return MOBILEBACKUP2_E_INVALID_ARG;
- idevice_connection_t conn = client->parent->parent->connection;
+ service_client_t raw = client->parent->parent->parent;
*bytes = 0;
@@ -329,7 +329,7 @@ mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, c
uint32_t received = 0;
do {
bytes_loc = 0;
- idevice_connection_receive(conn, data+received, length-received, (uint32_t*)&bytes_loc);
+ service_receive(raw, data+received, length-received, (uint32_t*)&bytes_loc);
if (bytes_loc <= 0) break;
received += bytes_loc;
} while (received < length);