summaryrefslogtreecommitdiffstats
path: root/dev/afccheck.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-07 21:02:00 +0200
committerGravatar Matt Colyer2009-07-18 10:39:42 -0700
commitb8ce722ffaeab22e141e18907c46bbed4659d857 (patch)
treeb30563dacd1ef2699fe79af9695bf237e1e688aa /dev/afccheck.c
parentab8e29dafc0577203e6867329b1d3ff9095a4fb2 (diff)
downloadlibimobiledevice-b8ce722ffaeab22e141e18907c46bbed4659d857.tar.gz
libimobiledevice-b8ce722ffaeab22e141e18907c46bbed4659d857.tar.bz2
Cleanup lockdown request API and fix docs, tools, bindings and exports
Diffstat (limited to 'dev/afccheck.c')
-rw-r--r--dev/afccheck.c15
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;