summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/msyncclient.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/dev/msyncclient.c b/dev/msyncclient.c
index 55d07c4..a6764b4 100644
--- a/dev/msyncclient.c
+++ b/dev/msyncclient.c
@@ -29,6 +29,7 @@
29 29
30#include <libiphone/libiphone.h> 30#include <libiphone/libiphone.h>
31#include "../src/MobileSync.h" 31#include "../src/MobileSync.h"
32#include "../src/utils.h"
32 33
33 34
34int main(int argc, char *argv[]) 35int main(int argc, char *argv[])
@@ -37,11 +38,9 @@ int main(int argc, char *argv[])
37 iphone_lckd_client_t control = NULL; 38 iphone_lckd_client_t control = NULL;
38 iphone_device_t phone = NULL; 39 iphone_device_t phone = NULL;
39 40
40 if (argc > 1 && !strcasecmp(argv[1], "--debug")) { 41 if (argc > 1 && !strcasecmp(argv[1], "--debug"))
41 iphone_set_debug(1); 42 iphone_set_debug_mask(DBGMASK_MOBILESYNC);
42 } else { 43
43 iphone_set_debug(0);
44 }
45 44
46 if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { 45 if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) {
47 printf("No iPhone found, is it plugged in?\n"); 46 printf("No iPhone found, is it plugged in?\n");
@@ -58,8 +57,10 @@ int main(int argc, char *argv[])
58 if (port) { 57 if (port) {
59 iphone_msync_client_t msync = NULL; 58 iphone_msync_client_t msync = NULL;
60 iphone_msync_new_client(phone, 3432, port, &msync); 59 iphone_msync_new_client(phone, 3432, port, &msync);
61 if (msync) 60 if (msync) {
61 iphone_msync_get_all_contacts(msync);
62 iphone_msync_free_client(msync); 62 iphone_msync_free_client(msync);
63 }
63 } else { 64 } else {
64 printf("Start service failure.\n"); 65 printf("Start service failure.\n");
65 } 66 }