From f4c4b783c8dbe2fe8e7e6f6b5f19f0d44b489c9a Mon Sep 17 00:00:00 2001 From: Zach C Date: Sun, 31 Aug 2008 11:25:22 -0700 Subject: Added binary-plist support (tweaked slightly to move stuff around) Signed-off-by: Matt Colyer fix makefile to take correct main function into account --- src/usbmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index 2114758..f0499fa 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -37,7 +37,7 @@ static int clients = 0; * * @return A USBMux packet */ -usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port) +usbmux_tcp_header *new_mux_packet(uint16_t s_port, uint16_t d_port) { usbmux_tcp_header *conn = (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header)); conn->type = htonl(6); -- cgit v1.1-32-gdbae From ef98ef7211bc6277e9a87349f0405957ab264936 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 8 Jan 2009 18:17:21 +0100 Subject: Perform proper goodby on lockdown shutdown. --- src/usbmux.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index 770d0db..c7ac7ef 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -182,8 +182,11 @@ iphone_error_t iphone_mux_free_client(iphone_umux_client_t client) return IPHONE_E_INVALID_ARG; client->header->tcp_flags = 0x04; + client->header->length = htonl(0x1C); client->header->scnt = htonl(client->header->scnt); client->header->ocnt = htonl(client->header->ocnt); + client->header->window = 0; + client->header->length16 = htons(0x1C); int bytes = 0; bytes = usb_bulk_write(client->phone->device, BULKOUT, (char *) client->header, sizeof(usbmux_tcp_header), 800); -- cgit v1.1-32-gdbae From 0934d1ac021dfb7907e4b580b38aa4a938cf2180 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Thu, 22 Jan 2009 22:21:12 +0100 Subject: Move things around and clean up some code. --- src/usbmux.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index eb7ec97..5eaa1d1 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -313,6 +313,7 @@ iphone_error_t iphone_mux_recv(iphone_umux_client_t client, char *data, uint32_t } else { memcpy(data, client->recv_buffer, client->r_len); free(client->recv_buffer); // don't need to deal with anymore, but... + client->recv_buffer = NULL; offset = client->r_len; // see #2b, above client->r_len = 0; } -- cgit v1.1-32-gdbae