diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 16:43:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 16:43:52 +0100 |
commit | 0f3bef042e866e967e41848ebd8bae85a86fef73 (patch) | |
tree | 809b692999a1ee85d5e31d513088e517bad50c52 /src/cfg_xml.c | |
parent | 3d218a89ecaf7ff265a26f922d99d74ef6ef6108 (diff) | |
download | rspamd-0f3bef042e866e967e41848ebd8bae85a86fef73.tar.gz rspamd-0f3bef042e866e967e41848ebd8bae85a86fef73.zip |
Add rcl parsers for workers options.
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r-- | src/cfg_xml.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c index fc7245390..215371f2f 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -1022,7 +1022,7 @@ worker_handle_type (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GH } wrk->type = type; if (wrk->worker->worker_init_func) { - wrk->ctx = wrk->worker->worker_init_func (); + wrk->ctx = wrk->worker->worker_init_func (cfg); } } else { @@ -2525,28 +2525,7 @@ register_module_opt (const gchar *mname, const gchar *optname, enum module_opt_t void register_worker_opt (gint wtype, const gchar *optname, element_handler_func func, gpointer dest_struct, gint offset) { - struct xml_config_param *param; - GHashTable *worker; - gint *new_key; - - if (worker_options == NULL) { - worker_options = g_hash_table_new (g_int_hash, g_int_equal); - } - if ((worker = g_hash_table_lookup (worker_options, &wtype)) == NULL) { - worker = g_hash_table_new (rspamd_str_hash, rspamd_str_equal); - new_key = g_malloc (sizeof (gint)); - *new_key = wtype; - g_hash_table_insert (worker_options, new_key, worker); - } - if ((param = g_hash_table_lookup (worker, optname)) == NULL) { - /* Register new param */ - param = g_malloc (sizeof (struct xml_config_param)); - param->handler = func; - param->user_data = dest_struct; - param->offset = offset; - param->name = optname; - g_hash_table_insert (worker, (char *)optname, param); - } + msg_err ("this function is depreciated and must not be used"); } /* Register new classifier option */ |