summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-05-16 14:09:46 -0400
committerirungentoo <irungentoo@gmail.com>2014-05-16 14:09:46 -0400
commit933428b89971216eb0650f77f15d0690a25067f0 (patch)
treef560729b29a6af43cf047cffcac1306af57e7482
parent1f7d8b71f01507623e2ff44e8e815a0a0aec105a (diff)
Removed non spec behaviour.
-rw-r--r--toxcore/TCP_server.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c
index 8be22593..31884604 100644
--- a/toxcore/TCP_server.c
+++ b/toxcore/TCP_server.c
@@ -610,15 +610,6 @@ static int rm_connection_index(TCP_Server *TCP_server, TCP_Secure_Connection *co
610 } 610 }
611} 611}
612 612
613static int disconnect_conection_index(TCP_Server *TCP_server, TCP_Secure_Connection *con, uint8_t con_number)
614{
615 if (rm_connection_index(TCP_server, con, con_number) != 0)
616 return -1;
617
618 send_disconnect_notification(con, con_number);
619 return 0;
620}
621
622static int handle_onion_recv_1(void *object, IP_Port dest, uint8_t *data, uint16_t length) 613static int handle_onion_recv_1(void *object, IP_Port dest, uint8_t *data, uint16_t length)
623{ 614{
624 TCP_Server *TCP_server = object; 615 TCP_Server *TCP_server = object;
@@ -671,7 +662,7 @@ static int handle_TCP_packet(TCP_Server *TCP_server, uint32_t con_id, uint8_t *d
671 if (length != 2) 662 if (length != 2)
672 return -1; 663 return -1;
673 664
674 return disconnect_conection_index(TCP_server, con, data[1] - NUM_RESERVED_PORTS); 665 return rm_connection_index(TCP_server, con, data[1] - NUM_RESERVED_PORTS);
675 } 666 }
676 667
677 case TCP_PACKET_PING: { 668 case TCP_PACKET_PING: {