diff options
| author | 2013-02-28 02:17:27 +0100 | |
|---|---|---|
| committer | 2013-02-28 02:17:27 +0100 | |
| commit | 31f24dd31bdd84308799123c8508d211291bb21d (patch) | |
| tree | e06b5241d3c69cc29ebf38e57948815495b11aea | |
| parent | 4b8644d16731415058376164ab20569961fec99c (diff) | |
| download | libimobiledevice-31f24dd31bdd84308799123c8508d211291bb21d.tar.gz libimobiledevice-31f24dd31bdd84308799123c8508d211291bb21d.tar.bz2 | |
service: use correct int16_t instead of uint16_t for error codes
| -rw-r--r-- | src/heartbeat.c | 2 | ||||
| -rw-r--r-- | src/service.c | 6 | ||||
| -rw-r--r-- | src/service.h | 4 | ||||
| -rw-r--r-- | src/webinspector.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/heartbeat.c b/src/heartbeat.c index 791cdb2..5645b3e 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c | |||
| @@ -113,7 +113,7 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr | |||
| 113 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) | 113 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) |
| 114 | { | 114 | { |
| 115 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; | 115 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; |
| 116 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), (uint16_t*)&err); | 116 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), (int16_t*)&err); |
| 117 | return err; | 117 | return err; |
| 118 | } | 118 | } |
| 119 | 119 | ||
diff --git a/src/service.c b/src/service.c index 738db02..959c9fb 100644 --- a/src/service.c +++ b/src/service.c | |||
| @@ -103,7 +103,7 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto | |||
| 103 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code | 103 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code |
| 104 | * otherwise. | 104 | * otherwise. |
| 105 | */ | 105 | */ |
| 106 | service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, uint16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), uint16_t *error_code) | 106 | service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code) |
| 107 | { | 107 | { |
| 108 | *client = NULL; | 108 | *client = NULL; |
| 109 | 109 | ||
| @@ -122,9 +122,9 @@ service_error_t service_client_factory_start_service(idevice_t device, const cha | |||
| 122 | return SERVICE_E_START_SERVICE_ERROR; | 122 | return SERVICE_E_START_SERVICE_ERROR; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | uint16_t ec; | 125 | int16_t ec; |
| 126 | if (constructor_func) { | 126 | if (constructor_func) { |
| 127 | ec = (uint16_t)constructor_func(device, service, client); | 127 | ec = (int16_t)constructor_func(device, service, client); |
| 128 | } else { | 128 | } else { |
| 129 | ec = service_client_new(device, service, (service_client_t*)client); | 129 | ec = service_client_new(device, service, (service_client_t*)client); |
| 130 | } | 130 | } |
diff --git a/src/service.h b/src/service.h index 3a22bed..8cea7a3 100644 --- a/src/service.h +++ b/src/service.h | |||
| @@ -40,11 +40,11 @@ typedef struct service_client_private *service_client_t; | |||
| 40 | 40 | ||
| 41 | typedef int16_t service_error_t; | 41 | typedef int16_t service_error_t; |
| 42 | 42 | ||
| 43 | #define SERVICE_CONSTRUCTOR(x) (uint16_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x) | 43 | #define SERVICE_CONSTRUCTOR(x) (int16_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x) |
| 44 | 44 | ||
| 45 | /* creation and destruction */ | 45 | /* creation and destruction */ |
| 46 | service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client); | 46 | service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client); |
| 47 | service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, uint16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), uint16_t *error_code); | 47 | service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code); |
| 48 | service_error_t service_client_free(service_client_t client); | 48 | service_error_t service_client_free(service_client_t client); |
| 49 | 49 | ||
| 50 | /* sending */ | 50 | /* sending */ |
diff --git a/src/webinspector.c b/src/webinspector.c index 40ce7dd..0be69dd 100644 --- a/src/webinspector.c +++ b/src/webinspector.c | |||
| @@ -113,7 +113,7 @@ webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service | |||
| 113 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) | 113 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) |
| 114 | { | 114 | { |
| 115 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; | 115 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; |
| 116 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), (uint16_t*)&err); | 116 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), (int16_t*)&err); |
| 117 | return err; | 117 | return err; |
| 118 | } | 118 | } |
| 119 | 119 | ||
