diff options
author | Matt Colyer | 2009-07-26 19:34:22 -0700 |
---|---|---|
committer | Matt Colyer | 2009-07-26 19:34:22 -0700 |
commit | eea538c94f01f8054f69f059614f19400187a472 (patch) | |
tree | 209a12dc8c8eaece15b8153d15e689c8c2147ab6 /dev/syslog_relay.c | |
parent | 8ebfd7d8eea89bb27e4e6dbb1f37fd90d98b439c (diff) | |
parent | 19c9750d670435ce430f0fc85a55faf127bdfbf9 (diff) | |
download | libimobiledevice-eea538c94f01f8054f69f059614f19400187a472.tar.gz libimobiledevice-eea538c94f01f8054f69f059614f19400187a472.tar.bz2 |
Merge commit 'martin-s/martin'
[#46 state:resolved]
Diffstat (limited to 'dev/syslog_relay.c')
-rw-r--r-- | dev/syslog_relay.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c index a93e85b..a096101 100644 --- a/dev/syslog_relay.c +++ b/dev/syslog_relay.c @@ -52,6 +52,7 @@ int main(int argc, char *argv[]) char uuid[41]; int port = 0; uuid[0] = 0; + uint32_t handle = 0; signal(SIGINT, clean_exit); signal(SIGQUIT, clean_exit); @@ -62,7 +63,7 @@ int main(int argc, char *argv[]) for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { iphone_set_debug_mask(DBGMASK_ALL); - iphone_set_debug(1); + iphone_set_debug_level(1); continue; } else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) { @@ -100,19 +101,19 @@ int main(int argc, char *argv[]) } } - if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { - iphone_free_device(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + iphone_device_free(phone); return -1; } /* start syslog_relay service and retrieve port */ ret = lockdownd_start_service(client, "com.apple.syslog_relay", &port); - if ((ret == IPHONE_E_SUCCESS) && port) { - lockdownd_free_client(client); + if ((ret == LOCKDOWN_E_SUCCESS) && port) { + lockdownd_client_free(client); /* connect to socket relay messages */ - - int sfd = usbmuxd_connect(iphone_get_device_handle(phone), port); + iphone_device_get_handle(phone, &handle); + int sfd = usbmuxd_connect(handle, port); if (sfd < 0) { printf("ERROR: Could not open usbmux connection.\n"); } else { @@ -148,7 +149,7 @@ int main(int argc, char *argv[]) printf("ERROR: Could not start service com.apple.syslog_relay.\n"); } - iphone_free_device(phone); + iphone_device_free(phone); return 0; } |