aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c
index 0f415210c..d41860937 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -3633,6 +3633,7 @@ start_controller_worker (struct rspamd_worker *worker)
struct module_ctx *mctx;
GHashTableIter iter;
gpointer key, value;
+ guint i;
struct rspamd_keypair_cache *cache;
struct timeval stv;
const guint save_stats_interval = 60 * 1000; /* 1 minute */
@@ -3792,9 +3793,7 @@ start_controller_worker (struct rspamd_worker *worker)
rspamd_http_router_set_key (ctx->http, ctx->key);
}
- g_hash_table_iter_init (&iter, ctx->cfg->c_modules);
- while (g_hash_table_iter_next (&iter, &key, &value)) {
- mctx = value;
+ PTR_ARRAY_FOREACH (ctx->cfg->c_modules, i, mctx) {
if (mctx->mod->module_attach_controller_func != NULL) {
mctx->mod->module_attach_controller_func (mctx,
ctx->custom_commands);