mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Use thread-safe types to store the LOG_PROTOCOL_WARN severity
Fixes a race condition; resolves 23954.
This commit is contained in:
@@ -152,6 +152,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
init_protocol_warning_severity_level();
|
||||
|
||||
{
|
||||
log_severity_list_t s;
|
||||
memset(&s, 0, sizeof(s));
|
||||
|
||||
@@ -278,6 +278,7 @@ main(int c, const char **v)
|
||||
s.masks[LOG_WARN-LOG_ERR] |= LD_BUG;
|
||||
add_stream_log(&s, "", fileno(stdout));
|
||||
}
|
||||
init_protocol_warning_severity_level();
|
||||
|
||||
options->command = CMD_RUN_UNITTESTS;
|
||||
if (crypto_global_init(accel_crypto, NULL, NULL)) {
|
||||
|
||||
Reference in New Issue
Block a user