talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 1e04ff348f7c3277c0880b3dbae86af574597c8f
parent 269c861467109d3e5bc81f5b845e24f9f4125e1a
Author: Ricardo Mones <ricardo@mones.org>
Date:   Tue, 16 Aug 2022 20:33:27 +0200

Fix CID 1508488: Control flow issues (DEADCODE)

And the logic surrounding the logging of filtering.

Diffstat:
Msrc/filtering.c | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/filtering.c b/src/filtering.c @@ -600,12 +600,12 @@ static gboolean filtering_match_condition(FilteringProp *filtering, MsgInfo *inf /* debug output */ if (debug_filtering_session) { - if (matches && prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) { + if (matches && prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_MED) { if (filtering->account_id == 0) { log_status_ok(LOG_DEBUG_FILTERING, _("rule is not account-based\n")); } else { - if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_MED) { + if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) { log_status_ok(LOG_DEBUG_FILTERING, _("rule is account-based [id=%d, name='%s'], " "matching the account currently used to retrieve messages\n"), @@ -615,19 +615,19 @@ static gboolean filtering_match_condition(FilteringProp *filtering, MsgInfo *inf } else if (!matches) { - if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_MED) { + if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) { + PrefsAccount *account = account_find_from_id(filtering->account_id); + log_status_skip(LOG_DEBUG_FILTERING, - _("rule is account-based, " - "not matching the account currently used to retrieve messages\n")); + _("rule is account-based [id=%d, name='%s'], " + "not matching the account currently used to retrieve messages [id=%d, name='%s']\n"), + filtering->account_id, account?account->account_name:_("NON_EXISTENT"), + ac_prefs->account_id, ac_prefs?ac_prefs->account_name:_("NON_EXISTENT")); } else { - if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) { - PrefsAccount *account = account_find_from_id(filtering->account_id); - + if (prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_MED) { log_status_skip(LOG_DEBUG_FILTERING, - _("rule is account-based [id=%d, name='%s'], " - "not matching the account currently used to retrieve messages [id=%d, name='%s']\n"), - filtering->account_id, account?account->account_name:_("NON_EXISTENT"), - ac_prefs->account_id, ac_prefs?ac_prefs->account_name:_("NON_EXISTENT")); + _("rule is account-based, " + "not matching the account currently used to retrieve messages\n")); } } }