diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index 5e32ce2..6858cf5 100644 --- a/src/device.c +++ b/src/device.c | |||
@@ -224,7 +224,7 @@ static int send_packet(struct mux_device *dev, enum mux_protocol proto, void *he | |||
224 | mhdr->tx_seq = htons(dev->tx_seq); | 224 | mhdr->tx_seq = htons(dev->tx_seq); |
225 | mhdr->rx_seq = htons(dev->rx_seq); | 225 | mhdr->rx_seq = htons(dev->rx_seq); |
226 | dev->tx_seq++; | 226 | dev->tx_seq++; |
227 | } | 227 | } |
228 | memcpy(buffer + mux_header_size, header, hdrlen); | 228 | memcpy(buffer + mux_header_size, header, hdrlen); |
229 | if(data && length) | 229 | if(data && length) |
230 | memcpy(buffer + mux_header_size + hdrlen, data, length); | 230 | memcpy(buffer + mux_header_size + hdrlen, data, length); |
@@ -690,6 +690,7 @@ static void device_tcp_input(struct mux_device *dev, struct tcphdr *th, unsigned | |||
690 | return; | 690 | return; |
691 | } | 691 | } |
692 | conn->state = CONN_CONNECTED; | 692 | conn->state = CONN_CONNECTED; |
693 | usbmuxd_log(LL_DEBUG, "Client connected to device %d (%d->%d)", dev->id, sport, dport); | ||
693 | if(client_notify_connect(conn->client, RESULT_OK) < 0) { | 694 | if(client_notify_connect(conn->client, RESULT_OK) < 0) { |
694 | conn->client = NULL; | 695 | conn->client = NULL; |
695 | connection_teardown(conn); | 696 | connection_teardown(conn); |
@@ -978,8 +979,8 @@ void device_check_timeouts(void) | |||
978 | FOREACH(struct mux_device *dev, &device_list) { | 979 | FOREACH(struct mux_device *dev, &device_list) { |
979 | if(dev->state == MUXDEV_ACTIVE) { | 980 | if(dev->state == MUXDEV_ACTIVE) { |
980 | FOREACH(struct mux_connection *conn, &dev->connections) { | 981 | FOREACH(struct mux_connection *conn, &dev->connections) { |
981 | if((conn->state == CONN_CONNECTED) && | 982 | if((conn->state == CONN_CONNECTED) && |
982 | (conn->flags & CONN_ACK_PENDING) && | 983 | (conn->flags & CONN_ACK_PENDING) && |
983 | (ct - conn->last_ack_time) > ACK_TIMEOUT) { | 984 | (ct - conn->last_ack_time) > ACK_TIMEOUT) { |
984 | usbmuxd_log(LL_DEBUG, "Sending ACK due to expired timeout (%" PRIu64 " -> %" PRIu64 ")", conn->last_ack_time, ct); | 985 | usbmuxd_log(LL_DEBUG, "Sending ACK due to expired timeout (%" PRIu64 " -> %" PRIu64 ")", conn->last_ack_time, ct); |
985 | send_tcp_ack(conn); | 986 | send_tcp_ack(conn); |