diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/msg_logger.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/msg_logger.c b/src/util/msg_logger.c index 07c9e92..2d813d3 100644 --- a/src/util/msg_logger.c +++ b/src/util/msg_logger.c @@ -59,6 +59,9 @@ /* Override the fallback setting (see above) with the specified /* function pointer. This remains in effect until the next /* msg_logger_init() or msg_logger_control() call. +/* When the function is called with a null argument, it should +/* allocate resources immediately. This is needed in programs +/* that drop privileges after process initialization. /* .IP CA_MSG_LOGGER_CTL_DISABLE /* Disable the msg_logger. This remains in effect until the /* next msg_logger_init() call. @@ -320,6 +323,9 @@ void msg_logger_control(int name,...) msg_logger_disconnect(); if (MSG_LOGGER_NEED_SOCKET()) msg_logger_connect(); + if (msg_logger_sock == MSG_LOGGER_SOCK_NONE + && msg_logger_fallback_fn) + msg_logger_fallback_fn((char *) 0); break; default: msg_panic("%s: bad name %d", myname, name); |