From: Alan T. DeKok Date: Fri, 27 Nov 2009 11:07:25 +0000 (+0100) Subject: Initialize timers for Status-Server X-Git-Tag: release_2_1_8~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5576906d9da7f8c5c144437dcb995158ed31fd09;p=thirdparty%2Ffreeradius-server.git Initialize timers for Status-Server For some weird reason they weren't initialized in debugging mode, so we force it here. This WAS tested to work... so I have no idea why it stopped. We also ignore Status-Server packets when marking home_servers as alive. That way, the ping_check will work properly... --- diff --git a/src/main/event.c b/src/main/event.c index 5f48274d772..49e7976e272 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -777,6 +777,8 @@ static void ping_home_server(void *ctx) request->next_callback = NULL; request->child_state = REQUEST_PROXIED; + gettimeofday(&request->when, NULL); + home->when = request->when; request->when.tv_sec += home->ping_timeout;; INSERT_EVENT(no_response_to_ping, request); @@ -3005,7 +3007,9 @@ REQUEST *received_proxy_response(RADIUS_PACKET *packet) * mark it alive on *any* packet, even if it's lost all * of the *other* packets in the last 10s. */ - request->home_server->state = HOME_STATE_ALIVE; + if (request->proxy->code != PW_STATUS_SERVER) { + request->home_server->state = HOME_STATE_ALIVE; + } #ifdef WITH_COA /*