Skip to content

Instantly share code, notes, and snippets.

@brianairb
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianairb/11096061 to your computer and use it in GitHub Desktop.
Save brianairb/11096061 to your computer and use it in GitHub Desktop.
usbmuxd patch
diff --git a/src/device.c b/src/device.c
index e36509e..ea99d63 100644
--- a/src/device.c
+++ b/src/device.c
@@ -441,7 +441,7 @@ void device_client_process(int device_id, struct mux_client *client, short event
memmove(conn->ib_buf, conn->ib_buf + size, conn->ib_size);
}
}
- if(events & POLLIN) {
+ if((events & POLLIN) && conn->sendable > 0) {
// There is inbound trafic on the client socket,
// convert it to tcp and send to the device
size = client_read(conn->client, conn->ob_buf, conn->sendable);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment