summaryrefslogtreecommitdiff
path: root/zhm/zhm.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1987-09-28 12:06:36 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1987-09-28 12:06:36 +0000
commit43958ba0117930de2869f6d44542e788656bb5c2 (patch)
treed37497d5c91f146049683e38759b824914055f00 /zhm/zhm.c
parentb7fa99383d1b49bbe23c7caf60bf7af6e33047ba (diff)
add flag 'booting' to indicate whether we have ever talked to a server
so that we send HM_BOOT messages to each server until one responds.
Diffstat (limited to 'zhm/zhm.c')
-rw-r--r--zhm/zhm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zhm/zhm.c b/zhm/zhm.c
index dd4e0ad..2786a92 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -42,6 +42,7 @@ static char rcsid_hm_c[] = "$Header$";
int hmdebug = 0; /* %&*^@ kerberos stole debug variable!!! */
int no_server = 1, timeout_type = 0, serv_loop = 0;
+int booting = 1;
int nserv = 0, nclt = 0, nservchang = 0, sig_type = 0;
long starttime;
struct sockaddr_in cli_sin, serv_sin, from;
@@ -426,6 +427,7 @@ server_manager(notice)
syslog (LOG_INFO, "Bad notice from port %u.", notice->z_port);
} else {
/* This is our server, handle the notice */
+ booting = 0;
DPR ("A notice came in from the server.\n");
nserv++;
switch(notice->z_kind) {
@@ -639,7 +641,10 @@ new_server(sugg_serv)
syslog (LOG_INFO, "Server went down, finding new server.");
send_flush_notice(HM_DETACH);
find_next_server(sugg_serv);
- send_boot_notice(HM_ATTACH);
+ if (booting)
+ send_boot_notice(HM_BOOT);
+ else
+ send_boot_notice(HM_ATTACH);
}
void handle_timeout()