summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-08-26 20:34:26 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-09-03 20:03:47 +0000
commit6872c14e1a02445d945623ee6e85230c5d7ecbce (patch)
tree30d90b93445976e56b96946b6e87b764eddd48a8 /toxcore/net_crypto.c
parentd296490a742b226fc17a71cf96ab73fc16719b20 (diff)
Avoid use of global mutable state in mono_time on win32.
This uses a trick to get read-write access to `this` from a `const` member function, similar to C++ `mutable`, but uglier.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index a64ed970..736b9c4a 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -972,7 +972,7 @@ static int generate_request_packet(const Logger *log, uint8_t *data, uint16_t le
972 * return -1 on failure. 972 * return -1 on failure.
973 * return number of requested packets on success. 973 * return number of requested packets on success.
974 */ 974 */
975static int handle_request_packet(const Mono_Time *mono_time, const Logger *log, Packets_Array *send_array, 975static int handle_request_packet(Mono_Time *mono_time, const Logger *log, Packets_Array *send_array,
976 const uint8_t *data, uint16_t length, uint64_t *latest_send_time, uint64_t rtt_time) 976 const uint8_t *data, uint16_t length, uint64_t *latest_send_time, uint64_t rtt_time)
977{ 977{
978 if (length == 0) { 978 if (length == 0) {