Skip to content

Instantly share code, notes, and snippets.

@brianairb
Last active Aug 29, 2015
Embed
What would you like to do?
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