diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-24 13:58:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-24 13:58:42 +0100 |
commit | 25086ab2c3be0d174e319c0088c650cab3bae897 (patch) | |
tree | c0de77fbc14daffa048c9f6d063ff8cbe093dc50 /src/libserver/worker_util.c | |
parent | cddc9021de2e7d2eee1a843620af8c80eb5acf2c (diff) | |
download | rspamd-25086ab2c3be0d174e319c0088c650cab3bae897.tar.gz rspamd-25086ab2c3be0d174e319c0088c650cab3bae897.zip |
[Minor] Show all listening configurations
Diffstat (limited to 'src/libserver/worker_util.c')
-rw-r--r-- | src/libserver/worker_util.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 14394726d..5ebae998c 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1125,12 +1125,28 @@ rspamd_handle_child_fork (struct rspamd_worker *wrk, wrk->start_time = rspamd_get_calendar_ticks (); if (cf->bind_conf) { - msg_info_main ("starting %s process %P (%d); listen on: %s", + GString *listen_conf_stringified = g_string_new (NULL); + struct rspamd_worker_bind_conf *cur_conf; + + LL_FOREACH (cf->bind_conf, cur_conf) { + if (cur_conf->next) { + rspamd_printf_gstring (listen_conf_stringified, "%s, ", + cur_conf->bind_line); + } + else { + rspamd_printf_gstring (listen_conf_stringified, "%s", + cur_conf->bind_line); + } + } + + msg_info_main ("starting %s process %P (%d); listen on: %v", cf->worker->name, - getpid (), wrk->index, cf->bind_conf->bind_line); + getpid (), wrk->index, listen_conf_stringified); + g_string_free (listen_conf_stringified, TRUE); } else { - msg_info_main ("starting %s process %P (%d)", cf->worker->name, + msg_info_main ("starting %s process %P (%d); no listen", + cf->worker->name, getpid (), wrk->index); } /* Close parent part of socketpair */ |