浏览代码

bugfix: Fixed the calculation of hourly statistics for several gateways

Roman Dmitriev 1 年之前
父节点
当前提交
550bb05
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
 }