Bladeren bron

bugfix: Fixed the calculation of hourly statistics for several gateways

Roman Dmitriev 1 jaar geleden
bovenliggende
commit
550bb05
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      scripts/parse_flow.pl

+ 1 - 1
scripts/parse_flow.pl

@@ -323,7 +323,7 @@ if (!$hour_stat->{byte_in}) { $hour_stat->{byte_in}=0; }
 if (!$hour_stat->{byte_out}) { $hour_stat->{byte_out}=0; }
 $hour_stat->{byte_in} += $user_stats{$user_ip}{in};
 $hour_stat->{byte_out} += $user_stats{$user_ip}{out};
-$tSQL="UPDATE User_stats SET byte_in='".$hour_stat->{byte_in}."', byte_out='".$hour_stat->{byte_out}."' WHERE id=".$auth_id;
+$tSQL="UPDATE User_stats SET byte_in='".$hour_stat->{byte_in}."', byte_out='".$hour_stat->{byte_out}."' WHERE id='".$auth_id."' AND router_id='".$router_id."'";
 push (@batch_sql_traf,$tSQL);
 }