aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-02 14:28:23 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-02 14:28:23 +0400
commit819f96d75f73f0a2bcd2ccb064c224520c73f397 (patch)
tree463a7bc6be0e0001ae631f696b618d8e08f056f5 /src
parent2efbf8d0cbe6c3cc3fa97a2c80d0887a87b5a2a5 (diff)
downloadrspamd-819f96d75f73f0a2bcd2ccb064c224520c73f397.tar.gz
rspamd-819f96d75f73f0a2bcd2ccb064c224520c73f397.zip
* Fix inserting composite symbol
* Fix output of log line
Diffstat (limited to 'src')
-rw-r--r--src/filter.c6
-rw-r--r--src/logger.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/filter.c b/src/filter.c
index 83868e9b9..f1851d295 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -315,7 +315,6 @@ composites_foreach_callback (gpointer key, gpointer value, void *data)
GQueue *stack;
GList *symbols = NULL, *s;
gsize cur, op1, op2;
- struct symbol *res;
stack = g_queue_new ();
@@ -369,10 +368,7 @@ composites_foreach_callback (gpointer key, gpointer value, void *data)
s = g_list_next (s);
}
/* Add new symbol */
- res = memory_pool_alloc (cd->task->task_pool, sizeof (struct symbol));
- res->score = 1.;
- res->options = NULL;
- g_hash_table_insert (cd->metric_res->symbols, key, res);
+ insert_result (cd->task, key, 1.0, NULL);
}
}
diff --git a/src/logger.c b/src/logger.c
index 4b04a93f1..c7626a03c 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -176,7 +176,7 @@ close_log (void)
case RSPAMD_LOG_FILE:
if (rspamd_log->enabled) {
if (rspamd_log->repeats > REPEATS_MIN) {
- snprintf (tmpbuf, sizeof (tmpbuf), "Last message repeated %ud times", rspamd_log->repeats);
+ rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "Last message repeated %ud times", rspamd_log->repeats);
rspamd_log->repeats = 0;
if (rspamd_log->saved_message) {
file_log_function (NULL, rspamd_log->saved_function, rspamd_log->cfg->log_level, rspamd_log->saved_message, TRUE, NULL);