diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 13:26:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 13:26:51 +0100 |
commit | d6643f35d783784911ad2e2ca754bcfed29eb11d (patch) | |
tree | 55554d57d4439e278788a261eb5ad7e5016a1372 /src/plugins/custom | |
parent | 7e66b3bd08dbca9356013a3777f786076d1dacea (diff) | |
download | rspamd-d6643f35d783784911ad2e2ca754bcfed29eb11d.tar.gz rspamd-d6643f35d783784911ad2e2ca754bcfed29eb11d.zip |
Refactor config API.
Diffstat (limited to 'src/plugins/custom')
-rw-r--r-- | src/plugins/custom/ipmark/ipmark.c | 10 | ||||
-rw-r--r-- | src/plugins/custom/regmark/regmark.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/custom/ipmark/ipmark.c b/src/plugins/custom/ipmark/ipmark.c index a40a94582..1b4eb7f6c 100644 --- a/src/plugins/custom/ipmark/ipmark.c +++ b/src/plugins/custom/ipmark/ipmark.c @@ -47,7 +47,7 @@ enum ipmark_command { }; /* Exported functions */ -void module_init (struct config_file *cfg); +void module_init (struct rspamd_config *cfg); void* before_connect (void); gboolean parse_line (const char *line, size_t len, char **output, void *user_data); void after_connect (char **output, char **log_line, void *user_data); @@ -60,10 +60,10 @@ static radix_tree_t *radix = NULL; /* Implementation */ char * -get_module_opt (struct config_file *cfg, char *module_name, char *opt_name) +rspamd_config_get_module_opt (struct rspamd_config *cfg, char *module_name, char *opt_name) { GList *cur_opt; - struct module_opt *cur; + struct rspamd_module_opt *cur; cur_opt = g_hash_table_lookup (cfg->modules_opts, module_name); if (cur_opt == NULL) { @@ -216,11 +216,11 @@ write_radix_file (void) } void -module_init (struct config_file *cfg) +module_init (struct rspamd_config *cfg) { char *value; - if (cfg && (value = get_module_opt (cfg, "ipmark", "file")) != NULL) { + if (cfg && (value = rspamd_config_get_module_opt (cfg, "ipmark", "file")) != NULL) { filename = g_strdup (value); } diff --git a/src/plugins/custom/regmark/regmark.c b/src/plugins/custom/regmark/regmark.c index 35901f9aa..6b3374f67 100644 --- a/src/plugins/custom/regmark/regmark.c +++ b/src/plugins/custom/regmark/regmark.c @@ -54,7 +54,7 @@ #define MAX_LEVELS 32 /* Exported functions */ -void module_init (struct config_file *cfg); +void module_init (struct rspamd_config *cfg); void* before_connect (void); gboolean parse_line (const char *line, size_t len, char **output, void *user_data); void after_connect (char **output, char **log_line, void *user_data); @@ -67,10 +67,10 @@ static prefix_tree_t *tree = NULL; /* Implementation */ char * -get_module_opt (struct config_file *cfg, char *module_name, char *opt_name) +rspamd_config_get_module_opt (struct rspamd_config *cfg, char *module_name, char *opt_name) { GList *cur_opt; - struct module_opt *cur; + struct rspamd_module_opt *cur; cur_opt = g_hash_table_lookup (cfg->modules_opts, module_name); if (cur_opt == NULL) { @@ -89,11 +89,11 @@ get_module_opt (struct config_file *cfg, char *module_name, char *opt_name) } void -module_init (struct config_file *cfg) +module_init (struct rspamd_config *cfg) { char *value; - if (cfg && (value = get_module_opt (cfg, "ipmark", "file")) != NULL) { + if (cfg && (value = rspamd_config_get_module_opt (cfg, "ipmark", "file")) != NULL) { filename = g_strdup (value); } |