diff options
| author | 2019-09-27 12:52:03 +0200 | |
|---|---|---|
| committer | 2019-09-27 12:52:03 +0200 | |
| commit | 8f96c52de2f9f35f361d29095190fc673db7d1c1 (patch) | |
| tree | 991b5f37ed8c504b2f77a8d0afc22182afbd340c /src | |
| parent | acf0a76be3c81a8ce69817af2b16a546a08f7ecb (diff) | |
| download | libimobiledevice-8f96c52de2f9f35f361d29095190fc673db7d1c1.tar.gz libimobiledevice-8f96c52de2f9f35f361d29095190fc673db7d1c1.tar.bz2 | |
Make sure to handle timeout errors in device link service and all depending services
Diffstat (limited to 'src')
| -rw-r--r-- | src/device_link_service.c | 91 | ||||
| -rw-r--r-- | src/device_link_service.h | 22 | ||||
| -rw-r--r-- | src/mobilebackup.c | 5 | ||||
| -rw-r--r-- | src/mobilebackup.h | 1 | ||||
| -rw-r--r-- | src/mobilebackup2.c | 6 | ||||
| -rw-r--r-- | src/mobilebackup2.h | 2 | ||||
| -rw-r--r-- | src/mobilesync.c | 4 | ||||
| -rw-r--r-- | src/screenshotr.c | 6 |
8 files changed, 81 insertions, 56 deletions
diff --git a/src/device_link_service.c b/src/device_link_service.c index 007223e..856d301 100644 --- a/src/device_link_service.c +++ b/src/device_link_service.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * device_link_service.c | 2 | * device_link_service.c |
| 3 | * DeviceLink service implementation. | 3 | * DeviceLink service implementation. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010 Nikias Bassen, All Rights Reserved. | 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. |
| 6 | * | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or | 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public | 8 | * modify it under the terms of the GNU Lesser General Public |
| @@ -24,6 +24,27 @@ | |||
| 24 | #include "property_list_service.h" | 24 | #include "property_list_service.h" |
| 25 | #include "common/debug.h" | 25 | #include "common/debug.h" |
| 26 | 26 | ||
| 27 | static device_link_service_error_t device_link_error(property_list_service_error_t err) | ||
| 28 | { | ||
| 29 | switch (err) { | ||
| 30 | case PROPERTY_LIST_SERVICE_E_SUCCESS: | ||
| 31 | return DEVICE_LINK_SERVICE_E_SUCCESS; | ||
| 32 | case PROPERTY_LIST_SERVICE_E_INVALID_ARG: | ||
| 33 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | ||
| 34 | case PROPERTY_LIST_SERVICE_E_PLIST_ERROR: | ||
| 35 | return DEVICE_LINK_SERVICE_E_PLIST_ERROR; | ||
| 36 | case PROPERTY_LIST_SERVICE_E_MUX_ERROR: | ||
| 37 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 38 | case PROPERTY_LIST_SERVICE_E_SSL_ERROR: | ||
| 39 | return DEVICE_LINK_SERVICE_E_SSL_ERROR; | ||
| 40 | case PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT: | ||
| 41 | return DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT; | ||
| 42 | default: | ||
| 43 | break; | ||
| 44 | } | ||
| 45 | return DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR; | ||
| 46 | } | ||
| 47 | |||
| 27 | /** | 48 | /** |
| 28 | * Internally used function to extract the message string from a DL* message | 49 | * Internally used function to extract the message string from a DL* message |
| 29 | * plist. | 50 | * plist. |
| @@ -89,18 +110,15 @@ device_link_service_error_t device_link_service_client_new(idevice_t device, loc | |||
| 89 | } | 110 | } |
| 90 | 111 | ||
| 91 | property_list_service_client_t plistclient = NULL; | 112 | property_list_service_client_t plistclient = NULL; |
| 92 | if (property_list_service_client_new(device, service, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 113 | device_link_service_error_t err = device_link_error(property_list_service_client_new(device, service, &plistclient)); |
| 93 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | 114 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { |
| 115 | return err; | ||
| 94 | } | 116 | } |
| 95 | 117 | ||
| 96 | /* create client object */ | 118 | /* create client object */ |
| 97 | device_link_service_client_t client_loc = (device_link_service_client_t) malloc(sizeof(struct device_link_service_client_private)); | 119 | device_link_service_client_t client_loc = (device_link_service_client_t) malloc(sizeof(struct device_link_service_client_private)); |
| 98 | client_loc->parent = plistclient; | 120 | client_loc->parent = plistclient; |
| 99 | 121 | ||
| 100 | /* enable SSL if requested */ | ||
| 101 | if (service->ssl_enabled) | ||
| 102 | property_list_service_enable_ssl(client_loc->parent); | ||
| 103 | |||
| 104 | /* all done, return success */ | 122 | /* all done, return success */ |
| 105 | *client = client_loc; | 123 | *client = client_loc; |
| 106 | return DEVICE_LINK_SERVICE_E_SUCCESS; | 124 | return DEVICE_LINK_SERVICE_E_SUCCESS; |
| @@ -121,11 +139,10 @@ device_link_service_error_t device_link_service_client_free(device_link_service_ | |||
| 121 | if (!client) | 139 | if (!client) |
| 122 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | 140 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; |
| 123 | 141 | ||
| 124 | if (property_list_service_client_free(client->parent) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 142 | device_link_service_error_t err = device_link_error(property_list_service_client_free(client->parent)); |
| 125 | return DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR; | ||
| 126 | } | ||
| 127 | free(client); | 143 | free(client); |
| 128 | return DEVICE_LINK_SERVICE_E_SUCCESS; | 144 | |
| 145 | return err; | ||
| 129 | } | 146 | } |
| 130 | 147 | ||
| 131 | /** | 148 | /** |
| @@ -157,9 +174,9 @@ device_link_service_error_t device_link_service_version_exchange(device_link_ser | |||
| 157 | char *msg = NULL; | 174 | char *msg = NULL; |
| 158 | 175 | ||
| 159 | /* receive DLMessageVersionExchange from device */ | 176 | /* receive DLMessageVersionExchange from device */ |
| 160 | if (property_list_service_receive_plist(client->parent, &array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 177 | err = device_link_error(property_list_service_receive_plist(client->parent, &array)); |
| 178 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { | ||
| 161 | debug_info("Did not receive initial message from device!"); | 179 | debug_info("Did not receive initial message from device!"); |
| 162 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 163 | goto leave; | 180 | goto leave; |
| 164 | } | 181 | } |
| 165 | device_link_service_get_message(array, &msg); | 182 | device_link_service_get_message(array, &msg); |
| @@ -203,18 +220,18 @@ device_link_service_error_t device_link_service_version_exchange(device_link_ser | |||
| 203 | plist_array_append_item(array, plist_new_string("DLMessageVersionExchange")); | 220 | plist_array_append_item(array, plist_new_string("DLMessageVersionExchange")); |
| 204 | plist_array_append_item(array, plist_new_string("DLVersionsOk")); | 221 | plist_array_append_item(array, plist_new_string("DLVersionsOk")); |
| 205 | plist_array_append_item(array, plist_new_uint(version_major)); | 222 | plist_array_append_item(array, plist_new_uint(version_major)); |
| 206 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 223 | err = device_link_error(property_list_service_send_binary_plist(client->parent, array)); |
| 224 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { | ||
| 207 | debug_info("Error when sending DLVersionsOk"); | 225 | debug_info("Error when sending DLVersionsOk"); |
| 208 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 209 | goto leave; | 226 | goto leave; |
| 210 | } | 227 | } |
| 211 | plist_free(array); | 228 | plist_free(array); |
| 212 | 229 | ||
| 213 | /* receive DeviceReady message */ | 230 | /* receive DeviceReady message */ |
| 214 | array = NULL; | 231 | array = NULL; |
| 215 | if (property_list_service_receive_plist(client->parent, &array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 232 | err = device_link_error(property_list_service_receive_plist(client->parent, &array)); |
| 233 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { | ||
| 216 | debug_info("Error when receiving DLMessageDeviceReady!"); | 234 | debug_info("Error when receiving DLMessageDeviceReady!"); |
| 217 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 218 | goto leave; | 235 | goto leave; |
| 219 | } | 236 | } |
| 220 | device_link_service_get_message(array, &msg); | 237 | device_link_service_get_message(array, &msg); |
| @@ -258,11 +275,9 @@ device_link_service_error_t device_link_service_disconnect(device_link_service_c | |||
| 258 | else | 275 | else |
| 259 | plist_array_append_item(array, plist_new_string("___EmptyParameterString___")); | 276 | plist_array_append_item(array, plist_new_string("___EmptyParameterString___")); |
| 260 | 277 | ||
| 261 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS; | 278 | device_link_service_error_t err = device_link_error(property_list_service_send_binary_plist(client->parent, array)); |
| 262 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | ||
| 263 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 264 | } | ||
| 265 | plist_free(array); | 279 | plist_free(array); |
| 280 | |||
| 266 | return err; | 281 | return err; |
| 267 | } | 282 | } |
| 268 | 283 | ||
| @@ -286,11 +301,9 @@ device_link_service_error_t device_link_service_send_ping(device_link_service_cl | |||
| 286 | plist_array_append_item(array, plist_new_string("DLMessagePing")); | 301 | plist_array_append_item(array, plist_new_string("DLMessagePing")); |
| 287 | plist_array_append_item(array, plist_new_string(message)); | 302 | plist_array_append_item(array, plist_new_string(message)); |
| 288 | 303 | ||
| 289 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS; | 304 | device_link_service_error_t err = device_link_error(property_list_service_send_binary_plist(client->parent, array)); |
| 290 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | ||
| 291 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 292 | } | ||
| 293 | plist_free(array); | 305 | plist_free(array); |
| 306 | |||
| 294 | return err; | 307 | return err; |
| 295 | } | 308 | } |
| 296 | 309 | ||
| @@ -317,11 +330,9 @@ device_link_service_error_t device_link_service_send_process_message(device_link | |||
| 317 | plist_array_append_item(array, plist_new_string("DLMessageProcessMessage")); | 330 | plist_array_append_item(array, plist_new_string("DLMessageProcessMessage")); |
| 318 | plist_array_append_item(array, plist_copy(message)); | 331 | plist_array_append_item(array, plist_copy(message)); |
| 319 | 332 | ||
| 320 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS; | 333 | device_link_service_error_t err = device_link_error(property_list_service_send_binary_plist(client->parent, array)); |
| 321 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | ||
| 322 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 323 | } | ||
| 324 | plist_free(array); | 334 | plist_free(array); |
| 335 | |||
| 325 | return err; | 336 | return err; |
| 326 | } | 337 | } |
| 327 | 338 | ||
| @@ -348,8 +359,9 @@ device_link_service_error_t device_link_service_receive_message(device_link_serv | |||
| 348 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | 359 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; |
| 349 | 360 | ||
| 350 | *msg_plist = NULL; | 361 | *msg_plist = NULL; |
| 351 | if (property_list_service_receive_plist(client->parent, msg_plist) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 362 | device_link_service_error_t err = device_link_error(property_list_service_receive_plist(client->parent, msg_plist)); |
| 352 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | 363 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { |
| 364 | return err; | ||
| 353 | } | 365 | } |
| 354 | 366 | ||
| 355 | if (!device_link_service_get_message(*msg_plist, dlmessage)) { | 367 | if (!device_link_service_get_message(*msg_plist, dlmessage)) { |
| @@ -378,11 +390,12 @@ device_link_service_error_t device_link_service_receive_process_message(device_l | |||
| 378 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | 390 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; |
| 379 | 391 | ||
| 380 | plist_t pmsg = NULL; | 392 | plist_t pmsg = NULL; |
| 381 | if (property_list_service_receive_plist(client->parent, &pmsg) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 393 | device_link_service_error_t err = device_link_error(property_list_service_receive_plist(client->parent, &pmsg)); |
| 382 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | 394 | if (err != DEVICE_LINK_SERVICE_E_SUCCESS) { |
| 395 | return err; | ||
| 383 | } | 396 | } |
| 384 | 397 | ||
| 385 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR; | 398 | err = DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR; |
| 386 | 399 | ||
| 387 | char *msg = NULL; | 400 | char *msg = NULL; |
| 388 | device_link_service_get_message(pmsg, &msg); | 401 | device_link_service_get_message(pmsg, &msg); |
| @@ -432,10 +445,7 @@ device_link_service_error_t device_link_service_send(device_link_service_client_ | |||
| 432 | if (!client || !plist) { | 445 | if (!client || !plist) { |
| 433 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | 446 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; |
| 434 | } | 447 | } |
| 435 | if (property_list_service_send_binary_plist(client->parent, plist) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 448 | return device_link_error(property_list_service_send_binary_plist(client->parent, plist)); |
| 436 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 437 | } | ||
| 438 | return DEVICE_LINK_SERVICE_E_SUCCESS; | ||
| 439 | } | 449 | } |
| 440 | 450 | ||
| 441 | /* Generic device link service receive function. | 451 | /* Generic device link service receive function. |
| @@ -455,9 +465,6 @@ device_link_service_error_t device_link_service_receive(device_link_service_clie | |||
| 455 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | 465 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; |
| 456 | } | 466 | } |
| 457 | 467 | ||
| 458 | if (property_list_service_receive_plist(client->parent, plist) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 468 | return device_link_error(property_list_service_receive_plist(client->parent, plist)); |
| 459 | return DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 460 | } | ||
| 461 | return DEVICE_LINK_SERVICE_E_SUCCESS; | ||
| 462 | } | 469 | } |
| 463 | 470 | ||
diff --git a/src/device_link_service.h b/src/device_link_service.h index a0c8390..eae912a 100644 --- a/src/device_link_service.h +++ b/src/device_link_service.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * device_link_service.h | 2 | * device_link_service.h |
| 3 | * Definitions for the DeviceLink service | 3 | * Definitions for the DeviceLink service |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010 Nikias Bassen, All Rights Reserved. | 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. |
| 6 | * | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or | 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public | 8 | * modify it under the terms of the GNU Lesser General Public |
| @@ -25,16 +25,16 @@ | |||
| 25 | #include "property_list_service.h" | 25 | #include "property_list_service.h" |
| 26 | 26 | ||
| 27 | /* Error Codes */ | 27 | /* Error Codes */ |
| 28 | #define DEVICE_LINK_SERVICE_E_SUCCESS 0 | 28 | typedef enum { |
| 29 | #define DEVICE_LINK_SERVICE_E_INVALID_ARG -1 | 29 | DEVICE_LINK_SERVICE_E_SUCCESS = 0, |
| 30 | #define DEVICE_LINK_SERVICE_E_PLIST_ERROR -2 | 30 | DEVICE_LINK_SERVICE_E_INVALID_ARG = -1, |
| 31 | #define DEVICE_LINK_SERVICE_E_MUX_ERROR -3 | 31 | DEVICE_LINK_SERVICE_E_PLIST_ERROR = -2, |
| 32 | #define DEVICE_LINK_SERVICE_E_BAD_VERSION -4 | 32 | DEVICE_LINK_SERVICE_E_MUX_ERROR = -3, |
| 33 | 33 | DEVICE_LINK_SERVICE_E_SSL_ERROR = -4, | |
| 34 | #define DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR -256 | 34 | DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT = -5, |
| 35 | 35 | DEVICE_LINK_SERVICE_E_BAD_VERSION = -6, | |
| 36 | /** Represents an error code. */ | 36 | DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR = -256 |
| 37 | typedef int16_t device_link_service_error_t; | 37 | } device_link_service_error_t; |
| 38 | 38 | ||
| 39 | struct device_link_service_client_private { | 39 | struct device_link_service_client_private { |
| 40 | property_list_service_client_t parent; | 40 | property_list_service_client_t parent; |
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index b32e0ba..2682a6f 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | * mobilebackup.c | 2 | * mobilebackup.c |
| 3 | * Contains functions for the built-in MobileBackup client. | 3 | * Contains functions for the built-in MobileBackup client. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. | ||
| 5 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. | 6 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. |
| 6 | * | 7 | * |
| 7 | * This library is free software; you can redistribute it and/or | 8 | * This library is free software; you can redistribute it and/or |
| @@ -52,6 +53,10 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 52 | return MOBILEBACKUP_E_PLIST_ERROR; | 53 | return MOBILEBACKUP_E_PLIST_ERROR; |
| 53 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: | 54 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: |
| 54 | return MOBILEBACKUP_E_MUX_ERROR; | 55 | return MOBILEBACKUP_E_MUX_ERROR; |
| 56 | case DEVICE_LINK_SERVICE_E_SSL_ERROR: | ||
| 57 | return MOBILEBACKUP_E_SSL_ERROR; | ||
| 58 | case DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT: | ||
| 59 | return MOBILEBACKUP_E_RECEIVE_TIMEOUT; | ||
| 55 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: | 60 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: |
| 56 | return MOBILEBACKUP_E_BAD_VERSION; | 61 | return MOBILEBACKUP_E_BAD_VERSION; |
| 57 | default: | 62 | default: |
diff --git a/src/mobilebackup.h b/src/mobilebackup.h index 19b9999..edda70f 100644 --- a/src/mobilebackup.h +++ b/src/mobilebackup.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | * mobilebackup.h | 2 | * mobilebackup.h |
| 3 | * Definitions for the mobilebackup service | 3 | * Definitions for the mobilebackup service |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. | ||
| 5 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. | 6 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. |
| 6 | * | 7 | * |
| 7 | * This library is free software; you can redistribute it and/or | 8 | * This library is free software; you can redistribute it and/or |
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 08ce22b..e7cc581 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * mobilebackup2.c | 2 | * mobilebackup2.c |
| 3 | * Contains functions for the built-in MobileBackup2 client (iOS4+ only) | 3 | * Contains functions for the built-in MobileBackup2 client (iOS4+ only) |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. | 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. |
| 6 | * | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or | 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public | 8 | * modify it under the terms of the GNU Lesser General Public |
| @@ -53,6 +53,10 @@ static mobilebackup2_error_t mobilebackup2_error(device_link_service_error_t err | |||
| 53 | return MOBILEBACKUP2_E_PLIST_ERROR; | 53 | return MOBILEBACKUP2_E_PLIST_ERROR; |
| 54 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: | 54 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: |
| 55 | return MOBILEBACKUP2_E_MUX_ERROR; | 55 | return MOBILEBACKUP2_E_MUX_ERROR; |
| 56 | case DEVICE_LINK_SERVICE_E_SSL_ERROR: | ||
| 57 | return MOBILEBACKUP2_E_SSL_ERROR; | ||
| 58 | case DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT: | ||
| 59 | return MOBILEBACKUP2_E_RECEIVE_TIMEOUT; | ||
| 56 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: | 60 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: |
| 57 | return MOBILEBACKUP2_E_BAD_VERSION; | 61 | return MOBILEBACKUP2_E_BAD_VERSION; |
| 58 | default: | 62 | default: |
diff --git a/src/mobilebackup2.h b/src/mobilebackup2.h index 4dba22a..025b6bf 100644 --- a/src/mobilebackup2.h +++ b/src/mobilebackup2.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * mobilebackup2.h | 2 | * mobilebackup2.h |
| 3 | * Definitions for the mobilebackup2 service (iOS4+) | 3 | * Definitions for the mobilebackup2 service (iOS4+) |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. | 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. |
| 6 | * | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or | 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public | 8 | * modify it under the terms of the GNU Lesser General Public |
diff --git a/src/mobilesync.c b/src/mobilesync.c index d903cfe..b0efc80 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -57,6 +57,10 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) | |||
| 57 | return MOBILESYNC_E_PLIST_ERROR; | 57 | return MOBILESYNC_E_PLIST_ERROR; |
| 58 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: | 58 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: |
| 59 | return MOBILESYNC_E_MUX_ERROR; | 59 | return MOBILESYNC_E_MUX_ERROR; |
| 60 | case DEVICE_LINK_SERVICE_E_SSL_ERROR: | ||
| 61 | return MOBILESYNC_E_SSL_ERROR; | ||
| 62 | case DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT: | ||
| 63 | return MOBILESYNC_E_RECEIVE_TIMEOUT; | ||
| 60 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: | 64 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: |
| 61 | return MOBILESYNC_E_BAD_VERSION; | 65 | return MOBILESYNC_E_BAD_VERSION; |
| 62 | default: | 66 | default: |
diff --git a/src/screenshotr.c b/src/screenshotr.c index 5c4a53f..ddb9d6e 100644 --- a/src/screenshotr.c +++ b/src/screenshotr.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * screenshotr.c | 2 | * screenshotr.c |
| 3 | * com.apple.mobile.screenshotr service implementation. | 3 | * com.apple.mobile.screenshotr service implementation. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. | 5 | * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. |
| 6 | * | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or | 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public | 8 | * modify it under the terms of the GNU Lesser General Public |
| @@ -50,6 +50,10 @@ static screenshotr_error_t screenshotr_error(device_link_service_error_t err) | |||
| 50 | return SCREENSHOTR_E_PLIST_ERROR; | 50 | return SCREENSHOTR_E_PLIST_ERROR; |
| 51 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: | 51 | case DEVICE_LINK_SERVICE_E_MUX_ERROR: |
| 52 | return SCREENSHOTR_E_MUX_ERROR; | 52 | return SCREENSHOTR_E_MUX_ERROR; |
| 53 | case DEVICE_LINK_SERVICE_E_SSL_ERROR: | ||
| 54 | return SCREENSHOTR_E_SSL_ERROR; | ||
| 55 | case DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT: | ||
| 56 | return SCREENSHOTR_E_RECEIVE_TIMEOUT; | ||
| 53 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: | 57 | case DEVICE_LINK_SERVICE_E_BAD_VERSION: |
| 54 | return SCREENSHOTR_E_BAD_VERSION; | 58 | return SCREENSHOTR_E_BAD_VERSION; |
| 55 | default: | 59 | default: |
