summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-04-22 09:10:57 -0400
committerirungentoo <irungentoo@gmail.com>2015-04-22 09:10:57 -0400
commitdb0438644c2ad85719ed0866d85cd3df9a71300b (patch)
tree66ff7de02f04e559ecfd092456e96b86b033b2f9 /toxcore/TCP_connection.c
parent3bd4f5902cb4dd4301ba9a8433f073fe31d6d2b5 (diff)
Fixed possible issue.
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r--toxcore/TCP_connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c
index 08cb728c..26b35a92 100644
--- a/toxcore/TCP_connection.c
+++ b/toxcore/TCP_connection.c
@@ -830,8 +830,6 @@ static int tcp_response_callback(void *object, uint8_t connection_id, const uint
830 if (connections_number == -1) 830 if (connections_number == -1)
831 return -1; 831 return -1;
832 832
833 set_tcp_connection_number(tcp_con->connection, connection_id, connections_number);
834
835 TCP_Connection_to *con_to = get_connection(tcp_c, connections_number); 833 TCP_Connection_to *con_to = get_connection(tcp_c, connections_number);
836 834
837 if (con_to == NULL) 835 if (con_to == NULL)
@@ -840,6 +838,8 @@ static int tcp_response_callback(void *object, uint8_t connection_id, const uint
840 if (set_tcp_connection_status(con_to, tcp_connections_number, TCP_CONNECTIONS_STATUS_REGISTERED, connection_id) == -1) 838 if (set_tcp_connection_status(con_to, tcp_connections_number, TCP_CONNECTIONS_STATUS_REGISTERED, connection_id) == -1)
841 return -1; 839 return -1;
842 840
841 set_tcp_connection_number(tcp_con->connection, connection_id, connections_number);
842
843 return 0; 843 return 0;
844} 844}
845 845