diff options
author | Nikias Bassen | 2010-01-13 01:45:42 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-01-13 01:54:05 +0100 |
commit | 471c997e66015a093afa9146d764d678514fed52 (patch) | |
tree | 70df4bc44ce21ed68c1f246564edeab9543dd3b8 | |
parent | 5c19d486959454560515666b0d250c20d9938d00 (diff) | |
download | libimobiledevice-471c997e66015a093afa9146d764d678514fed52.tar.gz libimobiledevice-471c997e66015a093afa9146d764d678514fed52.tar.bz2 |
lockdown/tools/python: use correct type for port parameter
-rw-r--r-- | dev/afccheck.c | 2 | ||||
-rw-r--r-- | dev/iphoneclient.c | 6 | ||||
-rw-r--r-- | dev/lckdclient.c | 2 | ||||
-rw-r--r-- | dev/msyncclient.c | 2 | ||||
-rw-r--r-- | include/libiphone/lockdown.h | 2 | ||||
-rw-r--r-- | src/lockdown.c | 4 | ||||
-rw-r--r-- | swig/iphone.i | 2 | ||||
-rw-r--r-- | tools/iphonesyslog.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 8e11b8a..569acf1 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) lockdownd_client_t client = NULL; iphone_device_t phone = NULL; GError *err; - int port = 0; + uint16_t port = 0; afc_client_t afc = NULL; if (argc > 1 && !strcasecmp(argv[1], "--debug")) { diff --git a/dev/iphoneclient.c b/dev/iphoneclient.c index eaced60..eab903c 100644 --- a/dev/iphoneclient.c +++ b/dev/iphoneclient.c @@ -39,7 +39,7 @@ static void notifier(const char *notification) static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification) { - int nport = 0; + uint16_t nport = 0; np_client_t np; lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport); @@ -59,8 +59,8 @@ static void perform_notification(iphone_device_t phone, lockdownd_client_t clien int main(int argc, char *argv[]) { unsigned int bytes = 0; - int port = 0, i = 0; - int npp; + uint16_t port = 0, i = 0; + uint16_t npp; lockdownd_client_t client = NULL; iphone_device_t phone = NULL; uint64_t lockfile = 0; diff --git a/dev/lckdclient.c b/dev/lckdclient.c index adf0aaa..7b7604e 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) } if (!strcmp(*args, "start") && len == 2) { - int port = 0; + uint16_t port = 0; if(LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, *(args + 1), &port)) { printf("started service %s on port %i\n", *(args + 1), port); } diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 6134649..c136ef2 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c @@ -141,7 +141,7 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client int main(int argc, char *argv[]) { - int port = 0; + uint16_t port = 0; lockdownd_client_t client = NULL; iphone_device_t phone = NULL; diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h index fb6b0c6..7fa5384 100644 --- a/include/libiphone/lockdown.h +++ b/include/libiphone/lockdown.h @@ -73,7 +73,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type); lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); -lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, int *port); +lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, uint16_t *port); lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled); lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id); lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); diff --git a/src/lockdown.c b/src/lockdown.c index a85f8ae..1befb72 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1207,7 +1207,7 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char * @return an error code (LOCKDOWN_E_SUCCESS on success) */ -lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, int *port) +lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, uint16_t *port) { if (!client || !service || !port) return LOCKDOWN_E_INVALID_ARG; @@ -1220,7 +1220,7 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char return LOCKDOWN_E_NO_RUNNING_SESSION; plist_t dict = NULL; - uint32_t port_loc = 0; + uint16_t port_loc = 0; lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; free(host_id); diff --git a/swig/iphone.i b/swig/iphone.i index de6b80f..f1969ed 100644 --- a/swig/iphone.i +++ b/swig/iphone.i @@ -85,7 +85,7 @@ void my_delete_Lockdownd(Lockdownd* lckd) { MobileSync* my_new_MobileSync(Lockdownd* lckd) { if (!lckd || !lckd->dev) return NULL; MobileSync* client = NULL; - int port = 0; + uint16_t port = 0; if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(lckd->client, "com.apple.mobilesync", &port)) { client = (MobileSync*) malloc(sizeof(MobileSync)); client->dev = lckd->dev; diff --git a/tools/iphonesyslog.c b/tools/iphonesyslog.c index 195fc7c..017956e 100644 --- a/tools/iphonesyslog.c +++ b/tools/iphonesyslog.c @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; int i; char uuid[41]; - int port = 0; + uint16_t port = 0; uuid[0] = 0; signal(SIGINT, clean_exit); |