diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
| @@ -46,11 +46,11 @@ static void perform_notification(iphone_device_t phone, lockdownd_client_t clien | |||
| 46 | lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport); | 46 | lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport); |
| 47 | if (nport) { | 47 | if (nport) { |
| 48 | printf("::::::::::::::: np was started ::::::::::::\n"); | 48 | printf("::::::::::::::: np was started ::::::::::::\n"); |
| 49 | np_new_client(phone, nport, &np); | 49 | np_client_new(phone, nport, &np); |
| 50 | if (np) { | 50 | if (np) { |
| 51 | printf("::::::::: PostNotification %s\n", notification); | 51 | printf("::::::::: PostNotification %s\n", notification); |
| 52 | np_post_notification(np, notification); | 52 | np_post_notification(np, notification); |
| 53 | np_free_client(np); | 53 | np_client_free(np); |
| 54 | } | 54 | } |
| 55 | } else { | 55 | } else { |
| 56 | printf("::::::::::::::: np was NOT started ::::::::::::\n"); | 56 | printf("::::::::::::::: np was NOT started ::::::::::::\n"); |
| @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) | |||
| 108 | lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &npp); | 108 | lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &npp); |
| 109 | if (npp) { | 109 | if (npp) { |
| 110 | printf("Notification Proxy started.\n"); | 110 | printf("Notification Proxy started.\n"); |
| 111 | np_new_client(phone, npp, &gnp); | 111 | np_client_new(phone, npp, &gnp); |
| 112 | } else { | 112 | } else { |
| 113 | printf("ERROR: Notification proxy could not be started.\n"); | 113 | printf("ERROR: Notification proxy could not be started.\n"); |
| 114 | } | 114 | } |
| @@ -225,17 +225,19 @@ int main(int argc, char *argv[]) | |||
| 225 | printf("XXX sleeping\n"); | 225 | printf("XXX sleeping\n"); |
| 226 | sleep(5); | 226 | sleep(5); |
| 227 | 227 | ||
| 228 | //perform_notification(phone, control, NP_SYNC_DID_FINISH); | ||
| 229 | |||
| 230 | printf("XXX unlocking file\n"); | 228 | printf("XXX unlocking file\n"); |
| 231 | afc_lock_file(afc, lockfile, AFC_LOCK_UN); | 229 | afc_lock_file(afc, lockfile, AFC_LOCK_UN); |
| 232 | 230 | ||
| 233 | printf("XXX closing file\n"); | 231 | printf("XXX closing file\n"); |
| 234 | afc_close_file(afc, lockfile); | 232 | afc_close_file(afc, lockfile); |
| 233 | |||
| 234 | printf("XXX sleeping\n"); | ||
| 235 | sleep(5); | ||
| 236 | //perform_notification(phone, client, NP_SYNC_DID_FINISH); | ||
| 235 | } | 237 | } |
| 236 | 238 | ||
| 237 | if (gnp) { | 239 | if (gnp) { |
| 238 | np_free_client(gnp); | 240 | np_client_free(gnp); |
| 239 | gnp = NULL; | 241 | gnp = NULL; |
| 240 | } | 242 | } |
| 241 | 243 | ||
