summaryrefslogtreecommitdiffstats
path: root/dev/iphoneclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev/iphoneclient.c')
-rw-r--r--dev/iphoneclient.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/dev/iphoneclient.c b/dev/iphoneclient.c
index d62d23f..eab903c 100644
--- a/dev/iphoneclient.c
+++ b/dev/iphoneclient.c
@@ -29,7 +29,6 @@
29#include <libiphone/lockdown.h> 29#include <libiphone/lockdown.h>
30#include <libiphone/afc.h> 30#include <libiphone/afc.h>
31#include <libiphone/notification_proxy.h> 31#include <libiphone/notification_proxy.h>
32#include "../src/utils.h"
33 32
34static void notifier(const char *notification) 33static void notifier(const char *notification)
35{ 34{
@@ -40,7 +39,7 @@ static void notifier(const char *notification)
40 39
41static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification) 40static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification)
42{ 41{
43 int nport = 0; 42 uint16_t nport = 0;
44 np_client_t np; 43 np_client_t np;
45 44
46 lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport); 45 lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport);
@@ -60,8 +59,8 @@ static void perform_notification(iphone_device_t phone, lockdownd_client_t clien
60int main(int argc, char *argv[]) 59int main(int argc, char *argv[])
61{ 60{
62 unsigned int bytes = 0; 61 unsigned int bytes = 0;
63 int port = 0, i = 0; 62 uint16_t port = 0, i = 0;
64 int npp; 63 uint16_t npp;
65 lockdownd_client_t client = NULL; 64 lockdownd_client_t client = NULL;
66 iphone_device_t phone = NULL; 65 iphone_device_t phone = NULL;
67 uint64_t lockfile = 0; 66 uint64_t lockfile = 0;
@@ -69,10 +68,8 @@ int main(int argc, char *argv[])
69 68
70 if (argc > 1 && !strcasecmp(argv[1], "--debug")) { 69 if (argc > 1 && !strcasecmp(argv[1], "--debug")) {
71 iphone_set_debug_level(1); 70 iphone_set_debug_level(1);
72 iphone_set_debug_mask(DBGMASK_ALL);
73 } else { 71 } else {
74 iphone_set_debug_level(0); 72 iphone_set_debug_level(0);
75 iphone_set_debug_mask(DBGMASK_NONE);
76 } 73 }
77 74
78 if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { 75 if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) {
@@ -87,7 +84,7 @@ int main(int argc, char *argv[])
87 if (uuid) 84 if (uuid)
88 free(uuid); 85 free(uuid);
89 86
90 if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { 87 if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneclient")) {
91 iphone_device_free(phone); 88 iphone_device_free(phone);
92 printf("Exiting.\n"); 89 printf("Exiting.\n");
93 return -1; 90 return -1;