diff options
Diffstat (limited to 'src/usbmux.c')
| -rw-r--r-- | src/usbmux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usbmux.c b/src/usbmux.c index d8e6b44..22ce588 100644 --- a/src/usbmux.c +++ b/src/usbmux.c | |||
| @@ -38,7 +38,7 @@ static int clients = 0; | |||
| 38 | * | 38 | * |
| 39 | * @return A USBMux packet | 39 | * @return A USBMux packet |
| 40 | */ | 40 | */ |
| 41 | usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port) | 41 | usbmux_tcp_header *new_mux_packet(uint16_t s_port, uint16_t d_port) |
| 42 | { | 42 | { |
| 43 | usbmux_tcp_header *conn = (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header)); | 43 | usbmux_tcp_header *conn = (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header)); |
| 44 | conn->type = htonl(6); | 44 | conn->type = htonl(6); |
| @@ -314,6 +314,7 @@ iphone_error_t iphone_mux_recv(iphone_umux_client_t client, char *data, uint32_t | |||
| 314 | } else { | 314 | } else { |
| 315 | memcpy(data, client->recv_buffer, client->r_len); | 315 | memcpy(data, client->recv_buffer, client->r_len); |
| 316 | free(client->recv_buffer); // don't need to deal with anymore, but... | 316 | free(client->recv_buffer); // don't need to deal with anymore, but... |
| 317 | client->recv_buffer = NULL; | ||
| 317 | offset = client->r_len; // see #2b, above | 318 | offset = client->r_len; // see #2b, above |
| 318 | client->r_len = 0; | 319 | client->r_len = 0; |
| 319 | } | 320 | } |
