summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-11 13:30:10 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-11 13:30:10 -0400
commit21e797ac90a06232aef03e47faecc048910ba1e3 (patch)
tree668aa1762f7cc9d60f89393f8f8546414036a00e /toxcore
parent7ab4ae7a6e9702ac8f484815d1de1fec56b8105e (diff)
Fixed some small TCP issues.
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/TCP_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c
index 6ead44a5..bc1b7ff4 100644
--- a/toxcore/TCP_client.c
+++ b/toxcore/TCP_client.c
@@ -451,7 +451,7 @@ static int handle_TCP_packet(TCP_Client_Connection *conn, const uint8_t *data, u
451 uint8_t con_id = data[1] - NUM_RESERVED_PORTS; 451 uint8_t con_id = data[1] - NUM_RESERVED_PORTS;
452 452
453 if (conn->connections[con_id].status != 1) 453 if (conn->connections[con_id].status != 1)
454 return -1; 454 return 0;
455 455
456 conn->connections[con_id].status = 2; 456 conn->connections[con_id].status = 2;
457 457
@@ -475,7 +475,7 @@ static int handle_TCP_packet(TCP_Client_Connection *conn, const uint8_t *data, u
475 return 0; 475 return 0;
476 476
477 if (conn->connections[con_id].status != 2) 477 if (conn->connections[con_id].status != 2)
478 return -1; 478 return 0;
479 479
480 conn->connections[con_id].status = 1; 480 conn->connections[con_id].status = 1;
481 481