summaryrefslogtreecommitdiff
path: root/zhm/zhm.c
diff options
context:
space:
mode:
authorGravatar David C. Jedlinsky <opus@mit.edu>1987-10-07 11:30:06 +0000
committerGravatar David C. Jedlinsky <opus@mit.edu>1987-10-07 11:30:06 +0000
commit05a37c16afb46195b3b6c23da5fbf42bec440724 (patch)
treec6198f6c6705790e5f7182f54e5a8781406ff4da /zhm/zhm.c
parentbd1dcdb1eb79997f3dea268a7c3963857fb36f6a (diff)
Set to send a boot if we are deactivated.
Diffstat (limited to 'zhm/zhm.c')
-rw-r--r--zhm/zhm.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/zhm/zhm.c b/zhm/zhm.c
index 9aecd1c..7e7c4ac 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -23,7 +23,7 @@ static char rcsid_hm_c[] = "$Header$";
int hmdebug = 0; /* kerberos stole variable called 'debug' */
int no_server = 1, nservchang = 0, nserv = 0, nclt = 0;
-int booting = 1, timeout_type = 0;
+int booting = 1, timeout_type = 0, deactivated = 1;
long starttime;
u_short cli_port;
struct sockaddr_in cli_sin, serv_sin, from;
@@ -98,6 +98,7 @@ char *argv[];
sig_type = 0;
syslog(LOG_INFO, "Flushing this client...");
send_flush_notice(HM_FLUSH);
+ deactivated = 1;
break;
case SIGTERM:
sig_type = 0;
@@ -145,6 +146,10 @@ char *argv[];
(notice.z_kind == ACKED) ||
(notice.z_kind == HMCTL))) {
/* Client program... */
+ if (deactivated) {
+ send_boot_notice(HM_BOOT);
+ deactivated = 0;
+ }
transmission_tower(&notice, packet, pak_len);
DPR2 ("Pending = %d\n", ZPending());
} else {
@@ -255,6 +260,7 @@ void init_hm()
}
send_boot_notice(HM_BOOT);
+ deactivated = 0;
(void)signal (SIGHUP, set_sig_type);
(void)signal (SIGALRM, set_sig_type);
@@ -300,19 +306,6 @@ void set_sig_type(sig)
sig_type = sig;
}
-new_server(sugg_serv)
- char *sugg_serv;
-{
- no_server = 1;
- syslog (LOG_INFO, "Server went down, finding new server.");
- send_flush_notice(HM_DETACH);
- find_next_server(sugg_serv);
- if (booting)
- send_boot_notice(HM_BOOT);
- else
- send_boot_notice(HM_ATTACH);
-}
-
send_stats(notice, sin)
ZNotice_t *notice;
struct sockaddr_in *sin;