diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-03-06 12:10:47 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-03-11 15:21:43 +0000 |
commit | 64bf3695d99688ad0967bdba2207c46845a3e8c2 (patch) | |
tree | 11ad17034eeef07285eb3a2cbc7e2137136783a4 /toxcore/tox_api.c | |
parent | fd5511ad37b0a845645d944bf64e94abc3dc53a3 (diff) |
Add a mutex lock/unlock inside every public API function.
Diffstat (limited to 'toxcore/tox_api.c')
-rw-r--r-- | toxcore/tox_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/tox_api.c b/toxcore/tox_api.c index 025c7456..8503f237 100644 --- a/toxcore/tox_api.c +++ b/toxcore/tox_api.c | |||
@@ -58,6 +58,7 @@ ACCESSORS(size_t, savedata_, length) | |||
58 | ACCESSORS(tox_log_cb *, log_, callback) | 58 | ACCESSORS(tox_log_cb *, log_, callback) |
59 | ACCESSORS(void *, log_, user_data) | 59 | ACCESSORS(void *, log_, user_data) |
60 | ACCESSORS(bool,, local_discovery_enabled) | 60 | ACCESSORS(bool,, local_discovery_enabled) |
61 | ACCESSORS(bool,, experimental_thread_safety) | ||
61 | 62 | ||
62 | const uint8_t *tox_options_get_savedata_data(const struct Tox_Options *options) | 63 | const uint8_t *tox_options_get_savedata_data(const struct Tox_Options *options) |
63 | { | 64 | { |
@@ -80,6 +81,7 @@ void tox_options_default(struct Tox_Options *options) | |||
80 | tox_options_set_proxy_type(options, TOX_PROXY_TYPE_NONE); | 81 | tox_options_set_proxy_type(options, TOX_PROXY_TYPE_NONE); |
81 | tox_options_set_hole_punching_enabled(options, true); | 82 | tox_options_set_hole_punching_enabled(options, true); |
82 | tox_options_set_local_discovery_enabled(options, true); | 83 | tox_options_set_local_discovery_enabled(options, true); |
84 | tox_options_set_experimental_thread_safety(options, false); | ||
83 | } | 85 | } |
84 | } | 86 | } |
85 | 87 | ||