commit 74f35a2: [Minor] Process all stat backends even in case of failure

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 9 17:07:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-09 18:01:19 +0100
URL: https://github.com/rspamd/rspamd/commit/74f35a297bede82503e83fa16b0b8ad55aeec75e (HEAD -> master)

[Minor] Process all stat backends even in case of failure

---
 src/libstat/stat_process.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 24fcd7312..e8e08f6d1 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -273,6 +273,7 @@ rspamd_stat_backends_post_process (struct rspamd_stat_ctx *st_ctx,
 	struct rspamd_statfile *st;
 	struct rspamd_classifier *cl;
 	gpointer bk_run;
+	gboolean ret = TRUE;
 
 	g_assert (task->stat_runtimes != NULL);
 
@@ -288,12 +289,12 @@ rspamd_stat_backends_post_process (struct rspamd_stat_ctx *st_ctx,
 
 		if (bk_run != NULL) {
 			if (!st->backend->finalize_process (task, bk_run, st_ctx)) {
-				return FALSE;
+				ret = FALSE;
 			}
 		}
 	}
 
-	return TRUE;
+	return ret;
 }
 
 static void


More information about the Commits mailing list