diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/filerelaytest.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/dev/filerelaytest.c b/dev/filerelaytest.c index 9094130..0f2f117 100644 --- a/dev/filerelaytest.c +++ b/dev/filerelaytest.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <stdlib.h> | ||
| 22 | #include <libimobiledevice/libimobiledevice.h> | 23 | #include <libimobiledevice/libimobiledevice.h> |
| 23 | #include <libimobiledevice/lockdown.h> | 24 | #include <libimobiledevice/lockdown.h> |
| 24 | #include <libimobiledevice/file_relay.h> | 25 | #include <libimobiledevice/file_relay.h> |
| @@ -41,7 +42,7 @@ int main(int argc, char **argv) | |||
| 41 | goto leave_cleanup; | 42 | goto leave_cleanup; |
| 42 | } | 43 | } |
| 43 | 44 | ||
| 44 | if (lockdownd_start_service(client, "com.apple.mobile.file_relay", &service) != LOCKDOWN_E_SUCCESS) { | 45 | if (lockdownd_start_service(client, FILE_RELAY_SERVICE_NAME, &service) != LOCKDOWN_E_SUCCESS) { |
| 45 | printf("could not start file_relay service!\n"); | 46 | printf("could not start file_relay service!\n"); |
| 46 | goto leave_cleanup; | 47 | goto leave_cleanup; |
| 47 | } | 48 | } |
| @@ -62,7 +63,20 @@ int main(int argc, char **argv) | |||
| 62 | } | 63 | } |
| 63 | 64 | ||
| 64 | idevice_connection_t dump = NULL; | 65 | idevice_connection_t dump = NULL; |
| 65 | const char *sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; | 66 | const char **sources; |
| 67 | const char *default_sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; | ||
| 68 | |||
| 69 | if (argc > 1) { | ||
| 70 | sources = calloc(1, argc * sizeof(char *)); | ||
| 71 | argc--; | ||
| 72 | argv++; | ||
| 73 | for (int i = 0; i < argc; i++) { | ||
| 74 | sources[i] = argv[i]; | ||
| 75 | } | ||
| 76 | } | ||
| 77 | else { | ||
| 78 | sources = default_sources; | ||
| 79 | } | ||
| 66 | 80 | ||
| 67 | printf("Requesting"); | 81 | printf("Requesting"); |
| 68 | int i = 0; | 82 | int i = 0; |
