ctx->start_time = time (NULL);
ctx->worker = worker;
ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->srv = worker->srv;
ctx->custom_commands = g_hash_table_new (rspamd_strcase_hash,
rspamd_strcase_equal);
munmap (m, ctx->cached_enable_password.len);
}
+ REF_RELEASE (ctx->cfg);
+
exit (EXIT_SUCCESS);
}
FALSE);
ctx->peer_fd = -1;
ctx->worker = worker;
+ ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
double_to_tv (ctx->master_timeout, &ctx->master_io_tv);
ctx->resolver = dns_resolver_init (worker->srv->logger,
rspamd_lru_hash_destroy (ctx->errors_ips);
g_hash_table_unref (ctx->keys);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}
double tim;
ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
if (ctx->hs_dir == NULL) {
ctx->hs_dir = ctx->cfg->hs_cache_dir;
rspamd_worker_block_signals ();
rspamd_log_close (worker->srv->logger);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}
NULL,
TRUE);
ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->scripts = worker->cf->scripts;
ctx->L = ctx->cfg->lua_state;
ctx->resolver = dns_resolver_init (worker->srv->logger,
rspamd_worker_block_signals ();
rspamd_log_close (worker->srv->logger);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}
L = worker->srv->cfg->lua_state;
ctx->L = L;
ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->resolver = dns_resolver_init (worker->srv->logger,
ctx->ev_base,
}
rspamd_log_close (worker->srv->logger);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}
struct rspamd_proxy_ctx *ctx = worker->ctx;
struct timeval rot_tv;
+ ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->ev_base = rspamd_prepare_worker (worker, "rspamd_proxy",
proxy_accept_socket,
TRUE);
}
rspamd_keypair_cache_destroy (ctx->keys_cache);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}
struct rspamd_worker_ctx *ctx = worker->ctx;
struct rspamd_worker_log_pipe *lp, *ltmp;
+ ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->ev_base = rspamd_prepare_worker (worker, "normal", accept_socket, TRUE);
msec_to_tv (ctx->timeout, &ctx->io_tv);
rspamd_symbols_cache_start_refresh (worker->srv->cfg->cache, ctx->ev_base);
g_slice_free1 (sizeof (*lp), lp);
}
+ REF_RELEASE (ctx->cfg);
+
exit (EXIT_SUCCESS);
}