summaryrefslogtreecommitdiff
path: root/server/server.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-02-05 19:05:26 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-02-05 19:05:26 +0000
commitf2a3cfa422369b4b2fd0ff38565488b3c36b5d54 (patch)
tree7c011672942c85b4408f3634521592ad09065ce0 /server/server.c
parentd4b33a756bab83f5490878806f47c65a1c2d9651 (diff)
fix problem with bdump_socket == -1 (not 0) when not in use.
Also schedule immediate hello when a dead server responds.
Diffstat (limited to 'server/server.c')
-rw-r--r--server/server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/server.c b/server/server.c
index 4ccb7e5..95c3110 100644
--- a/server/server.c
+++ b/server/server.c
@@ -962,6 +962,8 @@ int auth;
{
register ZServerDesc_t *which;
+ zdbug((LOG_DEBUG, "hello from %s", inet_ntoa(who->sin_addr)));
+
send_msg(who, ADMIN_IMHERE, auth);
if (adj != ADJUST)
return;
@@ -1020,6 +1022,8 @@ struct sockaddr_in *who;
{
register ZServerDesc_t *which = server_which_server(who);
+ zdbug((LOG_DEBUG, "srv_responded %s", inet_ntoa(who->sin_addr)));
+
if (!which) {
syslog(LOG_ERR, "hello input from non-server?!");
return;
@@ -1030,10 +1034,14 @@ struct sockaddr_in *who;
/* he responded, we thought he was dead. mark as starting
and negotiate */
which->zs_state = SERV_STARTING;
+ which->zs_timeout = timo_tardy;
+ timer_reset(which->zs_timer);
+ which->zs_timer = timer_set_rel(0L, server_timo,
+ (caddr_t) which);
case SERV_STARTING:
/* here we negotiate and set up a braindump */
- if (!bdump_socket) {
+ if (bdump_socket < 0) {
/* XXX offer it to the other server */
bdump_offer(who);
}