diff options
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/learn_cache/redis_cache.c | 6 | ||||
-rw-r--r-- | src/libstat/learn_cache/sqlite3_cache.c | 6 | ||||
-rw-r--r-- | src/libstat/stat_internal.h | 2 | ||||
-rw-r--r-- | src/libstat/stat_process.c | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c index 570f3f6a2..479623942 100644 --- a/src/libstat/learn_cache/redis_cache.c +++ b/src/libstat/learn_cache/redis_cache.c @@ -449,13 +449,13 @@ rspamd_stat_cache_redis_check (struct rspamd_task *task, gchar *h; if (rspamd_session_blocked (task->s)) { - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } h = rspamd_mempool_get_variable (task->task_pool, "words_hash"); if (h == NULL) { - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } if (redisAsyncCommand (rt->redis, rspamd_stat_cache_redis_get, rt, @@ -483,7 +483,7 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task, gint flag; if (rt == NULL || rt->ctx == NULL || rspamd_session_blocked (task->s)) { - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } h = rspamd_mempool_get_variable (task->task_pool, "words_hash"); diff --git a/src/libstat/learn_cache/sqlite3_cache.c b/src/libstat/learn_cache/sqlite3_cache.c index 52921326d..755114367 100644 --- a/src/libstat/learn_cache/sqlite3_cache.c +++ b/src/libstat/learn_cache/sqlite3_cache.c @@ -184,7 +184,7 @@ rspamd_stat_cache_sqlite3_check (struct rspamd_task *task, gint64 flag; if (task->tokens == NULL || task->tokens->len == 0) { - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } if (ctx != NULL && ctx->db != NULL) { @@ -223,7 +223,7 @@ rspamd_stat_cache_sqlite3_check (struct rspamd_task *task, /* Already learned */ msg_warn_task ("already seen stat hash: %*bs", rspamd_cryptobox_HASHBYTES, out); - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } else { /* Need to relearn */ @@ -248,7 +248,7 @@ rspamd_stat_cache_sqlite3_learn (struct rspamd_task *task, h = rspamd_mempool_get_variable (task->task_pool, "words_hash"); if (h == NULL) { - return RSPAMD_LEARN_INGORE; + return RSPAMD_LEARN_IGNORE; } flag = !!is_spam ? 1 : 0; diff --git a/src/libstat/stat_internal.h b/src/libstat/stat_internal.h index 5e2578177..e9fd3d52d 100644 --- a/src/libstat/stat_internal.h +++ b/src/libstat/stat_internal.h @@ -105,7 +105,7 @@ struct rspamd_stat_ctx { typedef enum rspamd_learn_cache_result { RSPAMD_LEARN_OK = 0, RSPAMD_LEARN_UNLEARN, - RSPAMD_LEARN_INGORE + RSPAMD_LEARN_IGNORE } rspamd_learn_t; struct rspamd_stat_ctx *rspamd_stat_get_ctx (void); diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index c697d2fd8..ac618770c 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -29,7 +29,7 @@ #define RSPAMD_LEARN_OP 1 #define RSPAMD_UNLEARN_OP 2 -static const gdouble similarity_treshold = 80.0; +static const gdouble similarity_threshold = 80.0; static void rspamd_stat_tokenize_parts_metadata (struct rspamd_stat_ctx *st_ctx, @@ -153,7 +153,7 @@ rspamd_stat_process_tokenize (struct rspamd_stat_ctx *st_ctx, } - if (pdiff != NULL && (1.0 - *pdiff) * 100.0 > similarity_treshold) { + if (pdiff != NULL && (1.0 - *pdiff) * 100.0 > similarity_threshold) { msg_debug_bayes ("message has two common parts (%.2f), so skip the last one", *pdiff); break; @@ -540,7 +540,7 @@ rspamd_stat_cache_check (struct rspamd_stat_ctx *st_ctx, learn_res = cl->cache->check (task, spam, rt); } - if (learn_res == RSPAMD_LEARN_INGORE) { + if (learn_res == RSPAMD_LEARN_IGNORE) { /* Do not learn twice */ g_set_error (err, rspamd_stat_quark (), 404, "<%s> has been already " "learned as %s, ignore it", MESSAGE_FIELD (task, message_id), @@ -1038,7 +1038,7 @@ rspamd_stat_check_autolearn (struct rspamd_task *task) } } else if (ucl_object_type (obj) == UCL_STRING) { - /* Legacy sript */ + /* Legacy script */ lua_script = ucl_object_tostring (obj); if (luaL_dostring (L, lua_script) != 0) { |