summaryrefslogtreecommitdiffstats
path: root/src/statfile.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-13 14:11:31 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-13 14:11:31 +0300
commit89f264624c1c846c995c22a8390b7e79f09ef960 (patch)
treec3a22a993c411510030930e88fff5b86890d5e24 /src/statfile.c
parent9a0362647374be48a29887d0571b8a665877be6b (diff)
downloadrspamd-89f264624c1c846c995c22a8390b7e79f09ef960.tar.gz
rspamd-89f264624c1c846c995c22a8390b7e79f09ef960.zip
* Add ability to configure sections in statfiles
* Add ability to define variables in modules blocks * Add symbolic aliases for statfile sections
Diffstat (limited to 'src/statfile.c')
-rw-r--r--src/statfile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/statfile.c b/src/statfile.c
index 115e29442..b77ca8779 100644
--- a/src/statfile.c
+++ b/src/statfile.c
@@ -518,3 +518,19 @@ statfile_pool_add_section (statfile_pool_t *pool, char *filename, uint32_t code,
return TRUE;
}
+
+uint32_t
+statfile_get_section_by_name (const char *name)
+{
+ if (g_ascii_strcasecmp (name, "common") == 0) {
+ return STATFILE_SECTION_COMMON;
+ }
+ else if (g_ascii_strcasecmp (name, "header") == 0) {
+ return STATFILE_SECTION_HEADERS;
+ }
+ else if (g_ascii_strcasecmp (name, "url") == 0) {
+ return STATFILE_SECTION_URLS;
+ }
+
+ return 0;
+}