summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 99d2a5c..1ee2480 100644
--- a/src/main.c
+++ b/src/main.c
@@ -824,11 +824,11 @@ static void *usbmuxd_client_init_thread(void *arg)
824 pthread_mutex_unlock(&usbmux_mutex); 824 pthread_mutex_unlock(&usbmux_mutex);
825 825
826 // setup connection to iPhone/iPod 826 // setup connection to iPhone/iPod
827// pthread_mutex_lock(&usbmux_mutex); 827 pthread_mutex_lock(&cur_dev->writer_mutex);
828 res = 828 res =
829 usbmux_new_client(cur_dev->phone, 0, ntohs(c_req->tcp_dport), 829 usbmux_new_client(cur_dev->phone, 0, ntohs(c_req->tcp_dport),
830 &(cdata->muxclient)); 830 &(cdata->muxclient));
831// pthread_mutex_unlock(&usbmux_mutex); 831 pthread_mutex_unlock(&cur_dev->writer_mutex);
832 832
833 if (res != 0) { 833 if (res != 0) {
834 usbmuxd_send_result(cdata->socket, c_req->header.tag, res); 834 usbmuxd_send_result(cdata->socket, c_req->header.tag, res);
@@ -870,7 +870,9 @@ static void *usbmuxd_client_init_thread(void *arg)
870 870
871 // time to clean up 871 // time to clean up
872 if (cdata && cdata->muxclient) { // should be non-NULL 872 if (cdata && cdata->muxclient) { // should be non-NULL
873 pthread_mutex_lock(&cdata->dev->writer_mutex);
873 usbmux_free_client(cdata->muxclient); 874 usbmux_free_client(cdata->muxclient);
875 pthread_mutex_unlock(&cdata->dev->writer_mutex);
874 } 876 }
875 877
876 leave: 878 leave: