From 02587abe650caf488727d7674e088df8a3ffd159 Mon Sep 17 00:00:00 2001 From: bodea Date: Fri, 1 Apr 2005 08:46:03 +0000 Subject: [PATCH] reset .die on master takeover --- Changes | 3 ++- cluster.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 17db24a..47dd20f 100644 --- a/Changes +++ b/Changes @@ -39,7 +39,8 @@ - Add result/error codes to CDN when shutting down sessions. Sends 2/7 (general error, try another LNS) when out of IP addresses, and 3 (adminstrative) for everything else (suggestion from Chris Gates). -- sessionshutdown: only send RADIUS stop when there's an ip address. +- Only send RADIUS stop record in sessionshutdown when there's an ip address. +- Reset .die on master takeover. * Fri Dec 17 2004 Brendan O'Dea 2.0.13 - Better cluster master collision resolution: keep a counter of state diff --git a/cluster.c b/cluster.c index 1dc5c53..e51ac5a 100644 --- a/cluster.c +++ b/cluster.c @@ -1,6 +1,6 @@ // L2TPNS Clustering Stuff -char const *cvs_id_cluster = "$Id: cluster.c,v 1.31 2005/02/14 06:58:38 bodea Exp $"; +char const *cvs_id_cluster = "$Id: cluster.c,v 1.32 2005/04/01 08:46:03 bodea Exp $"; #include #include @@ -580,9 +580,12 @@ void cluster_check_master(void) continue; } - // Reset all the idle timeouts.. + // Reset idle timeouts.. session[i].last_packet = time_now; + // Reset die relative to our uptime rather than the old master's + if (session[i].die) session[i].die = TIME; + // Accumulate un-sent byte counters. session[i].cin += sess_local[i].cin; session[i].cout += sess_local[i].cout; -- 2.20.1