diff options
Diffstat (limited to 'src/mobilesync.c')
| -rw-r--r-- | src/mobilesync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mobilesync.c b/src/mobilesync.c index 39b1da8..4fe24b2 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -69,7 +69,7 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) | |||
| 69 | * Connects to the mobilesync service on the specified device. | 69 | * Connects to the mobilesync service on the specified device. |
| 70 | * | 70 | * |
| 71 | * @param device The device to connect to. | 71 | * @param device The device to connect to. |
| 72 | * @param port Destination port (usually given by lockdownd_start_service()). | 72 | * @param service The service descriptor returned by lockdownd_start_service. |
| 73 | * @param client Pointer that will be set to a newly allocated | 73 | * @param client Pointer that will be set to a newly allocated |
| 74 | * #mobilesync_client_t upon successful return. | 74 | * #mobilesync_client_t upon successful return. |
| 75 | * | 75 | * |
| @@ -78,14 +78,14 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) | |||
| 78 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on | 78 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on |
| 79 | * the device is newer. | 79 | * the device is newer. |
| 80 | */ | 80 | */ |
| 81 | mobilesync_error_t mobilesync_client_new(idevice_t device, uint16_t port, | 81 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 82 | mobilesync_client_t * client) | 82 | mobilesync_client_t * client) |
| 83 | { | 83 | { |
| 84 | if (!device || port == 0 || !client || *client) | 84 | if (!device || service->port == 0 || !client || *client) |
| 85 | return MOBILESYNC_E_INVALID_ARG; | 85 | return MOBILESYNC_E_INVALID_ARG; |
| 86 | 86 | ||
| 87 | device_link_service_client_t dlclient = NULL; | 87 | device_link_service_client_t dlclient = NULL; |
| 88 | mobilesync_error_t ret = mobilesync_error(device_link_service_client_new(device, port, &dlclient)); | 88 | mobilesync_error_t ret = mobilesync_error(device_link_service_client_new(device, service, &dlclient)); |
| 89 | if (ret != MOBILESYNC_E_SUCCESS) { | 89 | if (ret != MOBILESYNC_E_SUCCESS) { |
| 90 | return ret; | 90 | return ret; |
| 91 | } | 91 | } |
