mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Document inverted mutex lock/unlock.
All other code in this file does lock/call/unlock, except this one instance, so we should explain why.
This commit is contained in:
parent
ced07d6700
commit
1bbe446760
|
@ -1957,6 +1957,8 @@ static int tcp_data_callback(void *object, int id, const uint8_t *data, uint16_t
|
|||
return tcp_handle_cookie_request(c, conn->connection_number_tcp, data, length);
|
||||
}
|
||||
|
||||
// This unlocks the mutex that at this point is locked by do_tcp before
|
||||
// calling do_tcp_connections.
|
||||
pthread_mutex_unlock(&c->tcp_mutex);
|
||||
int ret = handle_packet_connection(c, id, data, length, 0, userdata);
|
||||
pthread_mutex_lock(&c->tcp_mutex);
|
||||
|
|
Loading…
Reference in New Issue
Block a user