summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
diff options
context:
space:
mode:
authorzugz <mbays+tox@sdf.org>2017-01-19 18:51:14 +0100
committerzugz <mbays+tox@sdf.org>2017-01-21 22:08:52 +0100
commitb630121f2f659027e1c9f00cd97087ef34e95677 (patch)
tree7972d498fa05b0955c684c83b79bf12000cb7cf2 /toxcore/Messenger.h
parentf185834e9afe83a2bb06e015a3e41b4ac97b48c3 (diff)
reduce thread-unsafe use of static variables
- rework ip_ntoa() to avoid use of static variables - rework sort_client_list() to avoid use of static variables - move static 'lastdump' into Messenger struct - rework ID2String() to avoid use of static variables; rename to id_to_string() - fetch_broadcast_info(): attempt to mitigate risks from concurrent execution - current_time_monotonic(): attempt to mitigate risks from concurrent execution - comment on non-thread-safety of unix_time_update
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r--toxcore/Messenger.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index 218ec18b..e1dba698 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -240,6 +240,8 @@ struct Messenger {
240 Friend *friendlist; 240 Friend *friendlist;
241 uint32_t numfriends; 241 uint32_t numfriends;
242 242
243 time_t lastdump;
244
243 uint8_t has_added_relays; // If the first connection has occurred in do_messenger 245 uint8_t has_added_relays; // If the first connection has occurred in do_messenger
244 Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config 246 Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config
245 247