mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible issue.
This commit is contained in:
parent
3bd4f5902c
commit
db0438644c
|
@ -830,8 +830,6 @@ static int tcp_response_callback(void *object, uint8_t connection_id, const uint
|
||||||
if (connections_number == -1)
|
if (connections_number == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
set_tcp_connection_number(tcp_con->connection, connection_id, connections_number);
|
|
||||||
|
|
||||||
TCP_Connection_to *con_to = get_connection(tcp_c, connections_number);
|
TCP_Connection_to *con_to = get_connection(tcp_c, connections_number);
|
||||||
|
|
||||||
if (con_to == NULL)
|
if (con_to == NULL)
|
||||||
|
@ -840,6 +838,8 @@ static int tcp_response_callback(void *object, uint8_t connection_id, const uint
|
||||||
if (set_tcp_connection_status(con_to, tcp_connections_number, TCP_CONNECTIONS_STATUS_REGISTERED, connection_id) == -1)
|
if (set_tcp_connection_status(con_to, tcp_connections_number, TCP_CONNECTIONS_STATUS_REGISTERED, connection_id) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
set_tcp_connection_number(tcp_con->connection, connection_id, connections_number);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user