Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/webinspector.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int wi_connect(const char *device_id, char **to_device_id,

idevice_t phone = NULL;
plist_t node = NULL;
uint16_t port = 0;
lockdownd_service_descriptor_t service = NULL;
lockdownd_client_t client = NULL;
idevice_connection_t connection = NULL;
int fd = -1;
Expand Down Expand Up @@ -141,14 +141,14 @@ int wi_connect(const char *device_id, char **to_device_id,
}

// start webinspector, get port
if (lockdownd_start_service(client, "com.apple.webinspector", &port) ||
!port) {
if (lockdownd_start_service(client, "com.apple.webinspector", &service) ||
!service->port) {
perror("Could not start com.apple.webinspector!");
goto leave_cleanup;
}

// connect to webinspector
if (idevice_connect(phone, port, &connection)) {
if (idevice_connect(phone, service->port, &connection)) {
perror("idevice_connect failed!");
goto leave_cleanup;
}
Expand Down