]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
HA statd updates
authorneilbrown <neilbrown>
Mon, 6 Dec 2004 01:24:46 +0000 (01:24 +0000)
committerneilbrown <neilbrown>
Mon, 6 Dec 2004 01:24:46 +0000 (01:24 +0000)
ChangeLog
support/include/ha-callout.h
utils/statd/statd.c
utils/statd/svc_run.c

index 0def56f7225b95daedd41c75e3c93cc09ec9ec02..e57a496db4eddbed2520adad10f7915745795b94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2004-12-07 Marc Eshel <eshel@almaden.ibm.com>
+2004-12-06 Paul Clements <paul.clements@steeleye.com>  
+       * support/include/ha-callout.h: get return status from waitpid
+       correctly. 
+       * utils/statd/statd.c(sigusr): print current start when re-reading
+       notify list due to SIGUSR1
+       * utils/statd/svc_run.c(my_svc_run): call change_state when
+       re-notifying clients.
+       
+2004-12-06 Marc Eshel <eshel@almaden.ibm.com>
        * utils/statd/svc_run.c(my_svc_run): allow loop to exit when in
        MODE_NOTIFY_ONLY
        *utils/statd/rmtcall.c(statd_get_socket): if a hostname is given
index 707d51bcb8dae803688449e690f1da7ef47c0fb2..8acf0ded2a4b4bfeaf5c51042fe615aa9940bb10 100644 (file)
@@ -39,7 +39,7 @@ ha_callout(char *event, char *arg1, char *arg2, int arg3)
                        exit(2);
                case -1: perror("fork");
                        break;
-               default: ret = waitpid(pid, NULL, 0);
+               default: pid = waitpid(pid, &ret, 0);
        }
 
 #ifdef dprintf
index 3f6411586bc055a6990d097ab5e238dc3a9b3b57..48362c0104d332c4f4aa7db4f131b07794d48dc6 100644 (file)
@@ -111,7 +111,8 @@ killer (int sig)
 static void
 sigusr (int sig)
 {
-       dprintf (N_DEBUG, "Caught signal %d, re-reading notify list.", sig);
+       dprintf (N_DEBUG, "Caught signal %d, re-notifying (state %d).", sig,
+                                                               MY_STATE);
        re_notify = 1;
 }
 
index 7b69dc8938e744dcc0161026adbc356382df0eb7..f6bcbb906df907cd847cbe57d5a042d008c89abe 100644 (file)
@@ -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;
                }