dovecot-2.2: lib-master: master_service_is_master_stopped() now ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 18 15:46:04 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/52cbfa793147
changeset: 19392:52cbfa793147
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 18 17:45:35 2015 +0200
description:
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.

diffstat:

 src/lib-master/master-service.c |  3 ++-
 src/lib-master/master-service.h |  3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f78c312bc5a9 -r 52cbfa793147 src/lib-master/master-service.c
--- 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)
diff -r f78c312bc5a9 -r 52cbfa793147 src/lib-master/master-service.h
--- 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. */


More information about the dovecot-cvs mailing list