From 21e797ac90a06232aef03e47faecc048910ba1e3 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 11 Jul 2014 13:30:10 -0400 Subject: [PATCH] Fixed some small TCP issues. --- toxcore/TCP_client.c | 4 ++-- 1 file 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 uint8_t con_id = data[1] - NUM_RESERVED_PORTS; if (conn->connections[con_id].status != 1) - return -1; + return 0; conn->connections[con_id].status = 2; @@ -475,7 +475,7 @@ static int handle_TCP_packet(TCP_Client_Connection *conn, const uint8_t *data, u return 0; if (conn->connections[con_id].status != 2) - return -1; + return 0; conn->connections[con_id].status = 1;