summaryrefslogtreecommitdiffstats
path: root/dev/lckdclient.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 /dev/lckdclient.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 'dev/lckdclient.c')
-rw-r--r--dev/lckdclient.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/dev/lckdclient.c b/dev/lckdclient.c
index cc89634..b9be4de 100644
--- a/dev/lckdclient.c
+++ b/dev/lckdclient.c
@@ -136,9 +136,13 @@ int main(int argc, char *argv[])
}
if (!strcmp(*args, "start") && len == 2) {
- uint16_t port = 0;
- if(LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, *(args + 1), &port)) {
- printf("started service %s on port %i\n", *(args + 1), port);
+ lockdownd_service_descriptor_t service = NULL;
+ if(LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, *(args + 1), &service)) {
+ printf("started service %s on port %i\n", *(args + 1), service->port);
+ if (service) {
+ lockdownd_service_descriptor_free(service);
+ service = NULL;
+ }
}
else
{