X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fstatd%2Fsvc_run.c;h=f6bcbb906df907cd847cbe57d5a042d008c89abe;hp=e2d7c975df91a7014e55de09277ac833d0558f76;hb=2a8ca391fcc5f34aa02aa985a17823f6f7a4ad9f;hpb=af93e0306d87bba3f703386fd6390e9bf8e76816 diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c index e2d7c97..f6bcbb9 100644 --- a/utils/statd/svc_run.c +++ b/utils/statd/svc_run.c @@ -88,6 +88,9 @@ my_svc_run(void) if (svc_stop) return; if (re_notify) { + change_state(); + dprintf(N_DEBUG, "Notifying...(new state %d)", + MY_STATE); notify_hosts(); re_notify = 0; } @@ -107,7 +110,9 @@ my_svc_run(void) tv.tv_sec); selret = select(FD_SETSIZE, &readfds, (void *) 0, (void *) 0, &tv); - } else { + } else if (run_mode & MODE_NOTIFY_ONLY) + return; + else { dprintf(N_DEBUG, "Waiting for client connections."); selret = select(FD_SETSIZE, &readfds, (void *) 0, (void *) 0, (struct timeval *) 0);