dovecot-2.2: master: Include used protocols in the "starting up"...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Dec 9 18:41:47 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/e49f481af55b
changeset: 17055:e49f481af55b
user: Timo Sirainen <tss at iki.fi>
date: Mon Dec 09 18:41:30 2013 +0200
description:
master: Include used protocols in the "starting up" log message.
diffstat:
src/master/main.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r feb656fd212e -r e49f481af55b src/master/main.c
--- a/src/master/main.c Mon Dec 09 15:42:20 2013 +0200
+++ b/src/master/main.c Mon Dec 09 18:41:30 2013 +0200
@@ -10,6 +10,7 @@
#include "hostpid.h"
#include "abspath.h"
#include "ipwd.h"
+#include "str.h"
#include "execv-const.h"
#include "mountpoint-list.h"
#include "restrict-process-size.h"
@@ -487,17 +488,25 @@
env_put(t_strconcat(DOVECOT_PRESERVE_ENVS_ENV"=", value, NULL));
}
-static void main_log_startup(void)
+static void main_log_startup(char **protocols)
{
#define STARTUP_STRING PACKAGE_NAME" v"DOVECOT_VERSION_FULL" starting up"
+ string_t *str = t_str_new(128);
rlim_t core_limit;
+ str_append(str, STARTUP_STRING);
+ if (protocols[0] == NULL)
+ str_append(str, " without any protocols");
+ else {
+ str_printfa(str, " for %s",
+ t_strarray_join((const char **)protocols, ", "));
+ }
+
core_dumps_disabled = restrict_get_core_limit(&core_limit) == 0 &&
core_limit == 0;
if (core_dumps_disabled)
- i_info(STARTUP_STRING" (core dumps disabled)");
- else
- i_info(STARTUP_STRING);
+ str_append(str, " (core dumps disabled)");
+ i_info("%s", str_c(str));
}
static void master_set_process_limit(void)
@@ -529,7 +538,7 @@
/* deny file access from everyone else except owner */
(void)umask(0077);
- main_log_startup();
+ main_log_startup(set->protocols_split);
lib_signals_init();
lib_signals_ignore(SIGPIPE, TRUE);
More information about the dovecot-cvs
mailing list