From: Vsevolod Stakhov Date: Mon, 27 Jul 2015 13:59:41 +0000 (+0100) Subject: Unbreak the rest. X-Git-Tag: 1.0.0~278 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88f30e7b837e445c5942e43abdee3a451b29f7ff;p=rspamd.git Unbreak the rest. --- diff --git a/src/libstat/backends/redis.c b/src/libstat/backends/redis.c index f25b88b7e..38d6c7a3a 100644 --- a/src/libstat/backends/redis.c +++ b/src/libstat/backends/redis.c @@ -294,14 +294,16 @@ rspamd_redis_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg) while (cur) { clf = cur->data; - curst = clf->statfiles; - while (curst) { - stf = curst->data; - - /* - * By default, all statfiles are treated as mmaped files - */ - if (stf->backend != NULL && strcmp (stf->backend, REDIS_BACKEND_TYPE)) { + if (clf->backend != NULL && strcmp (clf->backend, REDIS_BACKEND_TYPE)) { + + curst = clf->statfiles; + while (curst) { + stf = curst->data; + + /* + * By default, all statfiles are treated as mmaped files + */ + /* * Check configuration sanity */ @@ -355,16 +357,16 @@ rspamd_redis_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg) if (rspamd_redis_expand_object (backend->redis_object, stf, NULL, NULL) == 0) { msg_err ("statfile %s cannot write servers configuration", - stf->symbol); + stf->symbol); } } g_hash_table_insert (new->redis_elts, stf, backend); ctx->statfiles ++; - } - curst = curst->next; + curst = curst->next; + } } cur = g_list_next (cur); diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c index af84faef0..ca88a3477 100644 --- a/src/libstat/backends/sqlite3_backend.c +++ b/src/libstat/backends/sqlite3_backend.c @@ -359,12 +359,11 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx, while (cur) { clf = cur->data; + if (clf->backend && strcmp (clf->backend, SQLITE3_BACKEND_TYPE) == 0) { + curst = clf->statfiles; - curst = clf->statfiles; - while (curst) { - stf = curst->data; - - if (stf->backend && strcmp (stf->backend, SQLITE3_BACKEND_TYPE) == 0) { + while (curst) { + stf = curst->data; /* * Check configuration sanity */ @@ -394,9 +393,9 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx, } ctx->statfiles ++; - } - curst = curst->next; + curst = curst->next; + } } cur = g_list_next (cur); @@ -690,3 +689,11 @@ rspamd_sqlite3_get_stat (gpointer runtime, { return NULL; } + +gpointer +rspamd_sqlite3_load_tokenizer_config (gpointer runtime, + gsize *len) +{ + /* TODO: unbreak */ + return NULL; +}