From 517c3509bfa1987dc91fc5c15f86fcb8e5a6f7ed Mon Sep 17 00:00:00 2001 From: fendo Date: Wed, 20 Feb 2013 01:32:27 +0100 Subject: [PATCH 1/1] Session group update rate calculation --- grpsess.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grpsess.c b/grpsess.c index 13c6505..68ec968 100644 --- a/grpsess.c +++ b/grpsess.c @@ -479,7 +479,8 @@ sessionidt grp_getnextsession(groupidt g, in_addr_t ip) } } - if (grpsession[g].time_changed > config->grp_txrate_average_time) + //if (grpsession[g].time_changed > config->grp_txrate_average_time) + if (grpsession[g].time_changed > 1) { ltime_changed = grpsession[g].time_changed; grpsession[g].time_changed = 1; @@ -494,7 +495,7 @@ sessionidt grp_getnextsession(groupidt g, in_addr_t ip) { grpsession[g].sesslist[i].tx_rate = session[s2].coutgrp_delta/ltime_changed; session[s2].coutgrp_delta = grpsession[g].sesslist[i].tx_rate; - LOG(3, s2, session[s2].tunnel, "TX Rate: %d session weight: %d\n", grpsession[g].sesslist[i].tx_rate, grpsession[g].sesslist[i].weight); + //LOG(3, s2, session[s2].tunnel, "TX Rate: %d session weight: %d\n", grpsession[g].sesslist[i].tx_rate, grpsession[g].sesslist[i].weight); } if ( session[s2].ppp.phase > Establish && -- 2.20.1