summaryrefslogtreecommitdiffstats
path: root/iphone.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-04-13 14:22:24 +0200
committerGravatar Nikias Bassen2009-04-13 14:22:24 +0200
commit9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5 (patch)
tree5e36527dc25154182889bd42bada7590f54a9c9d /iphone.c
parentd6e0cb81973e99aa61c4b36e3e4a4dcd475c1e59 (diff)
downloadusbmuxd-9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5.tar.gz
usbmuxd-9932dadfc7ddc65ccb3d2988df1a6dcc9cf536c5.tar.bz2
This _should_ fix a race condition that happens when a client is about
to cleanup the stuff that is used by another client that is about to set up a new connection. Increased timeout in sock_stuff from 10 to 20 seconds and decreased the pullbulk recv timeout from 5 to 3 seconds.
Diffstat (limited to 'iphone.c')
-rw-r--r--iphone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iphone.c b/iphone.c
index 6be85e6..662432b 100644
--- a/iphone.c
+++ b/iphone.c
@@ -1086,7 +1086,7 @@ int iphone_mux_pullbulk(iphone_device_t phone)
1086 // start the cursor off just ahead of the leftover. 1086 // start the cursor off just ahead of the leftover.
1087 char* cursor = &phone->usbReceive.buffer[phone->usbReceive.leftover]; 1087 char* cursor = &phone->usbReceive.buffer[phone->usbReceive.leftover];
1088 // pull in content, note that the amount we can pull is capacity minus leftover 1088 // pull in content, note that the amount we can pull is capacity minus leftover
1089 int readlen = recv_from_phone_timeout(phone, cursor, phone->usbReceive.capacity - phone->usbReceive.leftover, 5000); 1089 int readlen = recv_from_phone_timeout(phone, cursor, phone->usbReceive.capacity - phone->usbReceive.leftover, 3000);
1090 if (readlen < 0) { 1090 if (readlen < 0) {
1091 res = readlen; 1091 res = readlen;
1092 //fprintf(stderr, "recv_from_phone_timeout gave us an error.\n"); 1092 //fprintf(stderr, "recv_from_phone_timeout gave us an error.\n");