Session group update rate calculation
authorfendo <fendo@bi12info.com>
Wed, 20 Feb 2013 00:32:27 +0000 (01:32 +0100)
committerfendo <fendo@bi12info.com>
Wed, 20 Feb 2013 00:32:27 +0000 (01:32 +0100)
grpsess.c

index 13c6505..68ec968 100644 (file)
--- 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;
        {
                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;
                        {
                                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 &&
                        }
 
                        if ( session[s2].ppp.phase > Establish &&