return NULL;
}
+ if (task->tokens == NULL || task->tokens->len == 0) {
+ return NULL;
+ }
+
if (learn) {
up = rspamd_upstream_get (ctx->write_servers,
RSPAMD_UPSTREAM_MASTER_SLAVE,
gchar *h;
h = rspamd_mempool_get_variable (task->task_pool, "words_hash");
- g_assert (h != NULL);
+
+ if (h == NULL) {
+ return RSPAMD_LEARN_INGORE;
+ }
double_to_tv (rt->ctx->timeout, &tv);
gint rc;
gint64 flag;
+ if (task->tokens == NULL || task->tokens->len == 0) {
+ return RSPAMD_LEARN_INGORE;
+ }
+
if (ctx != NULL && ctx->db != NULL) {
out = rspamd_mempool_alloc (task->task_pool, rspamd_cryptobox_HASHBYTES);
return RSPAMD_LEARN_UNLEARN;
}
}
- else {
-
- }
}
return RSPAMD_LEARN_OK;
gint64 flag;
h = rspamd_mempool_get_variable (task->task_pool, "words_hash");
- g_assert (h != NULL);
+
+ if (h == NULL) {
+ return RSPAMD_LEARN_INGORE;
+ }
flag = !!is_spam ? 1 : 0;