summaryrefslogtreecommitdiffstats
path: root/src/misagent.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-02-26 03:20:56 +0100
committerGravatar Martin Szulecki2013-02-26 03:20:56 +0100
commitfcc1bb855efb6860417ed827d3b50feba24a9a8b (patch)
tree47d3c7d6a985dc647f7962329014c8116d657cc9 /src/misagent.c
parent3b54aac30447bc02fafd721a63a752968628e7e0 (diff)
downloadlibimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.gz
libimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.bz2
Refactor port number use into service descriptor to enable SSL for services
This is a major change which breaks API but is required in order to support SSL communication for services as used by network connections.
Diffstat (limited to 'src/misagent.c')
-rw-r--r--src/misagent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misagent.c b/src/misagent.c
index 45f1391..c624603 100644
--- a/src/misagent.c
+++ b/src/misagent.c
@@ -91,20 +91,20 @@ static misagent_error_t misagent_check_result(plist_t response, int* status_code
91 * Connects to the misagent service on the specified device. 91 * Connects to the misagent service on the specified device.
92 * 92 *
93 * @param device The device to connect to. 93 * @param device The device to connect to.
94 * @param port Destination port (usually given by lockdownd_start_service). 94 * @param service The service descriptor returned by lockdownd_start_service.
95 * @param client Pointer that will point to a newly allocated 95 * @param client Pointer that will point to a newly allocated
96 * misagent_client_t upon successful return. 96 * misagent_client_t upon successful return.
97 * 97 *
98 * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when 98 * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
99 * client is NULL, or an MISAGENT_E_* error code otherwise. 99 * client is NULL, or an MISAGENT_E_* error code otherwise.
100 */ 100 */
101misagent_error_t misagent_client_new(idevice_t device, uint16_t port, misagent_client_t *client) 101misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client)
102{ 102{
103 if (!device) 103 if (!device)
104 return MISAGENT_E_INVALID_ARG; 104 return MISAGENT_E_INVALID_ARG;
105 105
106 property_list_service_client_t plistclient = NULL; 106 property_list_service_client_t plistclient = NULL;
107 misagent_error_t err = misagent_error(property_list_service_client_new(device, port, &plistclient)); 107 misagent_error_t err = misagent_error(property_list_service_client_new(device, service, &plistclient));
108 if (err != MISAGENT_E_SUCCESS) { 108 if (err != MISAGENT_E_SUCCESS) {
109 return err; 109 return err;
110 } 110 }