Skip to content

Commit

Permalink
Removed non spec behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
irungentoo committed May 16, 2014
1 parent 1f7d8b7 commit 933428b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions toxcore/TCP_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,6 @@ static int rm_connection_index(TCP_Server *TCP_server, TCP_Secure_Connection *co
}
}

static int disconnect_conection_index(TCP_Server *TCP_server, TCP_Secure_Connection *con, uint8_t con_number)
{
if (rm_connection_index(TCP_server, con, con_number) != 0)
return -1;

send_disconnect_notification(con, con_number);
return 0;
}

static int handle_onion_recv_1(void *object, IP_Port dest, uint8_t *data, uint16_t length)
{
TCP_Server *TCP_server = object;
Expand Down Expand Up @@ -671,7 +662,7 @@ static int handle_TCP_packet(TCP_Server *TCP_server, uint32_t con_id, uint8_t *d
if (length != 2)
return -1;

return disconnect_conection_index(TCP_server, con, data[1] - NUM_RESERVED_PORTS);
return rm_connection_index(TCP_server, con, data[1] - NUM_RESERVED_PORTS);
}

case TCP_PACKET_PING: {
Expand Down

0 comments on commit 933428b

Please sign in to comment.