mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Avoid calling log functions in logv when SMARTLIST_DEBUG is defined
This commit is contained in:
parent
db72b509d1
commit
add8acf428
1 changed files with 3 additions and 2 deletions
|
@ -490,7 +490,8 @@ logv,(int severity, log_domain_mask_t domain, const char *funcname,
|
||||||
assert(log_mutex_initialized);
|
assert(log_mutex_initialized);
|
||||||
LOCK_LOGS();
|
LOCK_LOGS();
|
||||||
|
|
||||||
if ((! (domain & LD_NOCB)) && smartlist_len(pending_cb_messages))
|
if ((! (domain & LD_NOCB)) && pending_cb_messages
|
||||||
|
&& smartlist_len(pending_cb_messages))
|
||||||
flush_pending_log_callbacks();
|
flush_pending_log_callbacks();
|
||||||
|
|
||||||
if (queue_startup_messages &&
|
if (queue_startup_messages &&
|
||||||
|
@ -945,7 +946,7 @@ flush_pending_log_callbacks(void)
|
||||||
smartlist_t *messages, *messages_tmp;
|
smartlist_t *messages, *messages_tmp;
|
||||||
|
|
||||||
LOCK_LOGS();
|
LOCK_LOGS();
|
||||||
if (0 == smartlist_len(pending_cb_messages)) {
|
if (!pending_cb_messages || 0 == smartlist_len(pending_cb_messages)) {
|
||||||
UNLOCK_LOGS();
|
UNLOCK_LOGS();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue