static fr_event_list_t *el = NULL;
static fr_packet_list_t *pl = NULL;
static int request_num_counter = 0;
-static struct timeval now;
time_t fr_start_time;
static int have_children;
static int just_started = TRUE;
static void wait_for_proxy_id_to_expire(void *ctx)
{
REQUEST *request = ctx;
+ struct timeval now;
rad_assert(request->magic == REQUEST_MAGIC);
rad_assert(request->proxy != NULL);
{
home_server *home = ctx;
char buffer[128];
+ struct timeval now;
home->state = HOME_STATE_ALIVE;
home->currently_outstanding = 0;
+
+ gettimeofday(&now, NULL);
home->revive_time = now;
/*
{
home_server *home;
char buffer[128];
+ struct timeval now;
rad_assert(request->home_server != NULL);
home->state = HOME_STATE_ALIVE;
home->currently_outstanding = 0;
+
+ gettimeofday(&now, NULL);
home->revive_time = now;
if (!fr_event_delete(el, &home->ev)) {
"Acct-Session-Id", "00000000", T_OP_SET);
vp = radius_pairmake(request, &request->proxy->vps,
"Event-Timestamp", "0", T_OP_SET);
- vp->vp_date = now.tv_sec;
+ vp->vp_date = request->when.tv_sec;
#else
rad_assert("Internal sanity check failed");
#endif
static void check_for_zombie_home_server(REQUEST *request)
{
home_server *home;
- struct timeval when;
+ struct timeval now, when;
home = request->home_server;
static void proxy_fallback_handler(REQUEST *request)
{
+ struct timeval now;
+
/*
* A proper time is required for wait_a_bit.
*/
static void post_proxy_fail_handler(REQUEST *request)
{
+ struct timeval now;
+
/*
* A proper time is required for wait_a_bit.
*/
static void no_response_to_proxied_request(void *ctx)
{
REQUEST *request = ctx;
+ struct timeval now;
time_t start;
home_server *home;
char buffer[128];
* where the proxy still sends packets to an unresponsive
* home server.
*/
+ fr_event_now(el, &now);
start = now.tv_sec - ((home->zombie_period + 3) / 4);
if (home->last_packet >= start) {
return;
static void wait_a_bit(void *ctx)
{
- struct timeval when;
+ struct timeval now, when;
REQUEST *request = ctx;
fr_event_callback_t callback = NULL;
static void retransmit_coa_request(void *ctx)
{
int delay, frac;
- struct timeval mrd;
+ struct timeval now, mrd;
REQUEST *request = ctx;
rad_assert(request->magic == REQUEST_MAGIC);
{
char buffer[128];
REQUEST *request;
+ struct timeval now;
/*
* Also removes from the proxy hash if responses == requests
RAD_REQUEST_FUNP fun;
REQUEST *request;
rad_listen_t *this = ctx;
- struct timeval when;
+ struct timeval now, when;
listen_detail_t *detail = this->data;
rad_assert(this->type == RAD_LISTEN_DETAIL);