diff options
author | Martin Szulecki | 2009-07-07 21:02:00 +0200 |
---|---|---|
committer | Martin Szulecki | 2009-07-07 21:02:00 +0200 |
commit | 62a6f558ac7ca7a9b83c2ed810929732c02bbc9d (patch) | |
tree | 4e78a77238af4d96e00f5b16b7a276f9a7db91f1 /dev/afccheck.c | |
parent | a1e2fec59eb7d0d2a3adbd4691b3ea2ee1302921 (diff) | |
download | libimobiledevice-62a6f558ac7ca7a9b83c2ed810929732c02bbc9d.tar.gz libimobiledevice-62a6f558ac7ca7a9b83c2ed810929732c02bbc9d.tar.bz2 |
Cleanup lockdown request API and fix docs, tools, bindings and exports
Diffstat (limited to 'dev/afccheck.c')
-rw-r--r-- | dev/afccheck.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index b107437..9174e32 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c @@ -25,6 +25,7 @@ #include <glib.h> #include <libiphone/libiphone.h> +#include <libiphone/lockdown.h> #include <libiphone/afc.h> #define BUFFER_SIZE 20000 @@ -40,10 +41,10 @@ typedef struct { void check_afc(gpointer data) { //prepare a buffer - int buffersize = BUFFER_SIZE * sizeof(int); + unsigned int buffersize = BUFFER_SIZE * sizeof(unsigned int); int *buf = (int *) malloc(buffersize); int *buf2 = (int *) malloc(buffersize); - int bytes = 0; + unsigned int bytes = 0; //fill buffer int i = 0; for (i = 0; i < BUFFER_SIZE; i++) { @@ -84,7 +85,7 @@ void check_afc(gpointer data) int main(int argc, char *argv[]) { - iphone_lckd_client_t control = NULL; + lockdownd_client_t client = NULL; iphone_device_t phone = NULL; GError *err; int port = 0; @@ -95,13 +96,13 @@ int main(int argc, char *argv[]) return 1; } - if (IPHONE_E_SUCCESS != iphone_lckd_new_client(phone, &control)) { + if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { iphone_free_device(phone); return 1; } - if (IPHONE_E_SUCCESS == iphone_lckd_start_service(control, "com.apple.afc", &port) && !port) { - iphone_lckd_free_client(control); + if (IPHONE_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) { + lockdownd_free_client(client); iphone_free_device(phone); fprintf(stderr, "Something went wrong when starting AFC."); return 1; @@ -128,7 +129,7 @@ int main(int argc, char *argv[]) } - iphone_lckd_free_client(control); + lockdownd_free_client(client); iphone_free_device(phone); return 0; |