diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-03 18:59:32 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-03 18:59:32 +0400 |
commit | 27360c622541db1cf27dc5bef39524ca912b0e3d (patch) | |
tree | 7dd4d737853d4fe393f8dfaa094a24da204997a2 /src/view.c | |
parent | ad56efc14e371b6a452c1ccc46aa68d800125468 (diff) | |
download | rspamd-27360c622541db1cf27dc5bef39524ca912b0e3d.tar.gz rspamd-27360c622541db1cf27dc5bef39524ca912b0e3d.zip |
* Add autolearn config options
* Fix parsing of invalid urls in html parser
* Add ability to specify symbols in view parameter as comma-separated list
Diffstat (limited to 'src/view.c')
-rw-r--r-- | src/view.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/view.c b/src/view.c index aeec8cd51..0bd534b32 100644 --- a/src/view.c +++ b/src/view.c @@ -68,6 +68,7 @@ gboolean add_view_symbols (struct rspamd_view *view, char *line) { struct rspamd_regexp *re = NULL; + GList *symbols; if (g_ascii_strncasecmp (line, "file://", sizeof ("file://") - 1) == 0) { if (parse_host_list (view->pool, view->symbols_hash, line + sizeof ("file://") - 1)) { @@ -80,7 +81,12 @@ add_view_symbols (struct rspamd_view *view, char *line) } else { /* Try to parse symbols line as comma separated list */ - + symbols = parse_comma_list (view->pool, line); + while (symbols) { + g_hash_table_insert (view->symbols_hash, (char *)symbols->data, symbols->data); + /* Symbols list would be free at pool destruction */ + symbols = g_list_next (symbols); + } } return FALSE; |