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 0def56f..e57a496 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 707d51b..8acf0de 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 3f64115..48362c0 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 7b69dc8..f6bcbb9 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;
                }