summaryrefslogtreecommitdiff
path: root/zhm
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1997-06-09 16:17:10 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1997-06-09 16:17:10 +0000
commitd33e482744fad80d95cdd89ed380c5b8401e49bf (patch)
tree51b09193de29021721879e686a21943784996be9 /zhm
parenta892ed58ff0bface370b3f440454dc6006ed2f25 (diff)
zhm could spin after losing contact with a server. This patch does
three things to resent_notices(): makes sure the while loop makes progress even when there's a packet whose timeout hasn't been reached, doesn't gratuitously reset timeout_type to NOTICES if we called new_server(), and doesn't reset the alarm if we called new_server().
Diffstat (limited to 'zhm')
-rw-r--r--zhm/queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zhm/queue.c b/zhm/queue.c
index d026817..fd87546 100644
--- a/zhm/queue.c
+++ b/zhm/queue.c
@@ -259,10 +259,10 @@ struct sockaddr_in *sin;
}
srch->q_data->timeout = time((time_t *)0) +
rexmit_times[srch->q_data->retries];
- srch = srch->q_forw;
}
+ srch = srch->q_forw;
}
} while (srch != &hm_queue);
- timeout_type = NOTICES;
- (void)alarm(rexmit_times[0]);
+ if (timeout_type == NOTICES)
+ (void)alarm(rexmit_times[0]);
}