diff options
author | Martin Szulecki | 2013-02-26 03:20:56 +0100 |
---|---|---|
committer | Martin Szulecki | 2013-02-26 03:20:56 +0100 |
commit | fcc1bb855efb6860417ed827d3b50feba24a9a8b (patch) | |
tree | 47d3c7d6a985dc647f7962329014c8116d657cc9 /dev/filerelaytest.c | |
parent | 3b54aac30447bc02fafd721a63a752968628e7e0 (diff) | |
download | libimobiledevice-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/filerelaytest.c')
-rw-r--r-- | dev/filerelaytest.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/dev/filerelaytest.c b/dev/filerelaytest.c index 8c9514b..9094130 100644 --- a/dev/filerelaytest.c +++ b/dev/filerelaytest.c @@ -27,6 +27,7 @@ int main(int argc, char **argv) { idevice_t dev = NULL; lockdownd_client_t client = NULL; + lockdownd_service_descriptor_t service = NULL; file_relay_client_t frc = NULL; if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) { @@ -40,8 +41,7 @@ int main(int argc, char **argv) goto leave_cleanup; } - uint16_t port = 0; - if (lockdownd_start_service(client, "com.apple.mobile.file_relay", &port) != LOCKDOWN_E_SUCCESS) { + if (lockdownd_start_service(client, "com.apple.mobile.file_relay", &service) != LOCKDOWN_E_SUCCESS) { printf("could not start file_relay service!\n"); goto leave_cleanup; } @@ -51,11 +51,16 @@ int main(int argc, char **argv) client = NULL; } - if (file_relay_client_new(dev, port, &frc) != FILE_RELAY_E_SUCCESS) { + if (file_relay_client_new(dev, service, &frc) != FILE_RELAY_E_SUCCESS) { printf("could not connect to file_relay service!\n"); goto leave_cleanup; } + if (service) { + lockdownd_service_descriptor_free(service); + service = NULL; + } + idevice_connection_t dump = NULL; const char *sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; |