Mercurial > dovecot > core-2.2
changeset 19392:52cbfa793147
lib-master: master_service_is_master_stopped() now returns FALSE if running standalone.
The only caller of this function was stats plugin to see if it should send
stats updates. So this fixes dovecot-lda, doveadm and other standalone tools
to send stats updates.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 18 Nov 2015 17:45:35 +0200 |
parents | f78c312bc5a9 |
children | 910656f4b7a0 |
files | src/lib-master/master-service.c src/lib-master/master-service.h |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-master/master-service.c Wed Nov 18 14:15:32 2015 +0200 +++ b/src/lib-master/master-service.c Wed Nov 18 17:45:35 2015 +0200 @@ -682,7 +682,8 @@ bool master_service_is_master_stopped(struct master_service *service) { - return service->io_status_error == NULL; + return service->io_status_error == NULL && + (service->flags & MASTER_SERVICE_FLAG_STANDALONE) == 0; } void master_service_anvil_send(struct master_service *service, const char *cmd)
--- a/src/lib-master/master-service.h Wed Nov 18 14:15:32 2015 +0200 +++ b/src/lib-master/master-service.h Wed Nov 18 17:45:35 2015 +0200 @@ -155,7 +155,8 @@ /* Returns TRUE if we've received a SIGINT/SIGTERM and we've decided to stop. */ bool master_service_is_killed(struct master_service *service); /* Returns TRUE if our master process is already stopped. This process may or - may not be dying itself. */ + may not be dying itself. Returns FALSE always if the process was started + standalone. */ bool master_service_is_master_stopped(struct master_service *service); /* Send command to anvil process, if we have fd to it. */