From: fendo Date: Wed, 20 Feb 2013 00:32:27 +0000 (+0100) Subject: Session group update rate calculation X-Git-Tag: 2.2.1-2sames3.8~10 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/517c3509bfa1987dc91fc5c15f86fcb8e5a6f7ed Session group update rate calculation --- 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 &&