wslog: Critical and error are always active.

The intention was that "error" and "critical" are *always*
active (always...). Do that.
This commit is contained in:
João Valverde 2021-06-19 03:26:48 +01:00 committed by Wireshark GitLab Utility
parent 256f5f6e30
commit 3256e45b4e
1 changed files with 7 additions and 7 deletions

View File

@ -150,13 +150,6 @@ static inline const char *domain_to_string(const char *domain)
static inline gboolean log_level_is_active(enum ws_log_level level)
{
/*
* Lower numerical levels have higher priority. Critical and above
* are always enabled.
*/
if (level <= LOG_LEVEL_CRITICAL)
return TRUE;
return level <= current_log_level;
}
@ -225,6 +218,13 @@ gboolean ws_log_msg_is_active(const char *domain, enum ws_log_level level)
{
int action;
/*
* Lower numerical levels have higher priority. Critical and above
* are always enabled.
*/
if (level <= LOG_LEVEL_CRITICAL)
return TRUE;
if ((action = NOISY_FILTER_MATCHES(domain, level)) != CONTINUE)
return action;