diff options
Diffstat (limited to 'toxcore/TCP_client.c')
-rw-r--r-- | toxcore/TCP_client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c index 6eae8408..1fae897f 100644 --- a/toxcore/TCP_client.c +++ b/toxcore/TCP_client.c | |||
@@ -555,7 +555,7 @@ int send_oob_packet(TCP_Client_Connection *con, const uint8_t *public_key, const | |||
555 | 555 | ||
556 | /* Set the number that will be used as an argument in the callbacks related to con_id. | 556 | /* Set the number that will be used as an argument in the callbacks related to con_id. |
557 | * | 557 | * |
558 | * When not set by this function, the number is ~0. | 558 | * When not set by this function, the number is -1. |
559 | * | 559 | * |
560 | * return 0 on success. | 560 | * return 0 on success. |
561 | * return -1 on failure. | 561 | * return -1 on failure. |
@@ -785,7 +785,7 @@ static int handle_TCP_client_packet(TCP_Client_Connection *conn, const uint8_t * | |||
785 | } | 785 | } |
786 | 786 | ||
787 | conn->connections[con_id].status = 1; | 787 | conn->connections[con_id].status = 1; |
788 | conn->connections[con_id].number = ~0; | 788 | conn->connections[con_id].number = -1; |
789 | memcpy(conn->connections[con_id].public_key, data + 2, CRYPTO_PUBLIC_KEY_SIZE); | 789 | memcpy(conn->connections[con_id].public_key, data + 2, CRYPTO_PUBLIC_KEY_SIZE); |
790 | 790 | ||
791 | if (conn->response_callback) { | 791 | if (conn->response_callback) { |
@@ -1038,7 +1038,7 @@ void do_TCP_connection(Mono_Time *mono_time, TCP_Client_Connection *tcp_connecti | |||
1038 | 1038 | ||
1039 | if (sizeof(data) == len) { | 1039 | if (sizeof(data) == len) { |
1040 | if (handle_handshake(tcp_connection, data) == 0) { | 1040 | if (handle_handshake(tcp_connection, data) == 0) { |
1041 | tcp_connection->kill_at = ~0; | 1041 | tcp_connection->kill_at = -1; |
1042 | tcp_connection->status = TCP_CLIENT_CONFIRMED; | 1042 | tcp_connection->status = TCP_CLIENT_CONFIRMED; |
1043 | } else { | 1043 | } else { |
1044 | tcp_connection->kill_at = 0; | 1044 | tcp_connection->kill_at = 0; |