diff options
Diffstat (limited to 'src/mobilebackup.c')
| -rw-r--r-- | src/mobilebackup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 78f9a5c..ab4dec0 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -64,7 +64,7 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 64 | * Connects to the mobilebackup service on the specified device. | 64 | * Connects to the mobilebackup service on the specified device. |
| 65 | * | 65 | * |
| 66 | * @param device The device to connect to. | 66 | * @param device The device to connect to. |
| 67 | * @param port Destination port (usually given by lockdownd_start_service). | 67 | * @param service The service descriptor returned by lockdownd_start_service. |
| 68 | * @param client Pointer that will be set to a newly allocated | 68 | * @param client Pointer that will be set to a newly allocated |
| 69 | * mobilebackup_client_t upon successful return. | 69 | * mobilebackup_client_t upon successful return. |
| 70 | * | 70 | * |
| @@ -72,14 +72,14 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 72 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if | 72 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if |
| 73 | * the mobilebackup version on the device is newer. | 73 | * the mobilebackup version on the device is newer. |
| 74 | */ | 74 | */ |
| 75 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, | 75 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 76 | mobilebackup_client_t * client) | 76 | mobilebackup_client_t * client) |
| 77 | { | 77 | { |
| 78 | if (!device || port == 0 || !client || *client) | 78 | if (!device || service->port == 0 || !client || *client) |
| 79 | return MOBILEBACKUP_E_INVALID_ARG; | 79 | return MOBILEBACKUP_E_INVALID_ARG; |
| 80 | 80 | ||
| 81 | device_link_service_client_t dlclient = NULL; | 81 | device_link_service_client_t dlclient = NULL; |
| 82 | mobilebackup_error_t ret = mobilebackup_error(device_link_service_client_new(device, port, &dlclient)); | 82 | mobilebackup_error_t ret = mobilebackup_error(device_link_service_client_new(device, service, &dlclient)); |
| 83 | if (ret != MOBILEBACKUP_E_SUCCESS) { | 83 | if (ret != MOBILEBACKUP_E_SUCCESS) { |
| 84 | return ret; | 84 | return ret; |
| 85 | } | 85 | } |
