aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-12-05 13:17:47 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-12-05 13:17:47 +0000
commit2ca6e26fe2e657023e53e50598f9b3b5eef39e23 (patch)
tree933eb969932d04e2bd605af8e556552c4bfd8ef8 /src
parent7d00ba404e3f7ae703503df765cfa04a6bc7d34f (diff)
downloadrspamd-2ca6e26fe2e657023e53e50598f9b3b5eef39e23.tar.gz
rspamd-2ca6e26fe2e657023e53e50598f9b3b5eef39e23.zip
Fix unix sockets for workers binding.
Diffstat (limited to 'src')
-rw-r--r--src/cfg_file.h2
-rw-r--r--src/cfg_rcl.c6
-rw-r--r--src/cfg_utils.c2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h
index 40500539d..ed45d7d95 100644
--- a/src/cfg_file.h
+++ b/src/cfg_file.h
@@ -415,7 +415,7 @@ gboolean parse_host_priority (memory_pool_t *pool, const gchar *str, gchar **add
* @param type type of credits
* @return 1 if line was successfully parsed and 0 in case of error
*/
-gboolean parse_bind_line (struct config_file *cfg, struct worker_conf *cf, gchar *str);
+gboolean parse_bind_line (struct config_file *cfg, struct worker_conf *cf, const gchar *str);
/**
* Init default values
diff --git a/src/cfg_rcl.c b/src/cfg_rcl.c
index a33040bfe..5860e13c7 100644
--- a/src/cfg_rcl.c
+++ b/src/cfg_rcl.c
@@ -437,7 +437,6 @@ rspamd_rcl_worker_handler (struct config_file *cfg, ucl_object_t *obj,
const gchar *worker_type, *worker_bind;
GQuark qtype;
struct worker_conf *wrk;
- struct rspamd_worker_bind_conf *bcf;
struct rspamd_worker_cfg_parser *wparser;
struct rspamd_worker_param_parser *whandler;
@@ -475,13 +474,10 @@ rspamd_rcl_worker_handler (struct config_file *cfg, ucl_object_t *obj,
if (!ucl_object_tostring_safe (cur, &worker_bind)) {
continue;
}
- bcf = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct rspamd_worker_bind_conf));
- if (!parse_host_port_priority (cfg->cfg_pool, worker_bind, &bcf->bind_host,
- &bcf->bind_port, NULL)) {
+ if (!parse_bind_line (cfg, wrk, worker_bind)) {
g_set_error (err, CFG_RCL_ERROR, EINVAL, "cannot parse bind line: %s", worker_bind);
return FALSE;
}
- LL_PREPEND (wrk->bind_conf, bcf);
}
}
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 0fe898d16..181e44f51 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -164,7 +164,7 @@ parse_host_priority (memory_pool_t *pool, const gchar *str, gchar **addr, guint
}
gboolean
-parse_bind_line (struct config_file *cfg, struct worker_conf *cf, gchar *str)
+parse_bind_line (struct config_file *cfg, struct worker_conf *cf, const gchar *str)
{
struct rspamd_worker_bind_conf *cnf;