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/cfg_utils.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/cfg_utils.c')
-rw-r--r-- | src/cfg_utils.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c index afb15a652..900e55f1b 100644 --- a/src/cfg_utils.c +++ b/src/cfg_utils.c @@ -586,6 +586,34 @@ unescape_quotes (char *line) } } +GList * +parse_comma_list (memory_pool_t *pool, char *line) +{ + GList *res = NULL; + char *c, *p, *str; + + c = line; + p = c; + + while (*p) { + if (*p == ',' && *c != *p) { + str = memory_pool_alloc (pool, p - c + 1); + g_strlcpy (str, c, p - c + 1); + res = g_list_prepend (res, str); + /* Skip spaces */ + while (g_ascii_isspace (*(++p))); + c = p; + continue; + } + p ++; + } + if (res != NULL) { + memory_pool_add_destructor (pool, (pool_destruct_func)g_list_free, res); + } + + return res; +} + /* * vi:ts=4 */ |