summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-12-03 14:02:43 -0500
committerirungentoo <irungentoo@gmail.com>2014-12-03 14:02:43 -0500
commit4a27f61956559fbdc2e18c66cd57f5de3d9024ea (patch)
treee7ed50ae26f5ea61f71541b7014061ad8c10db96
parentd8a8e8b982ca5e6a8fef5474b26af9b3c8b77f54 (diff)
Fixed possible threading issue.
-rw-r--r--toxcore/net_crypto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 7ad3b413..a813395a 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2343,7 +2343,9 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet
2343 if (conn == 0) 2343 if (conn == 0)
2344 return -1; 2344 return -1;
2345 2345
2346 pthread_mutex_lock(&conn->mutex);
2346 conn->direct_lastrecv_time = current_time_monotonic(); 2347 conn->direct_lastrecv_time = current_time_monotonic();
2348 pthread_mutex_unlock(&conn->mutex);
2347 return 0; 2349 return 0;
2348} 2350}
2349 2351