Updated Branches: refs/heads/4.1 48fc5c886 -> aed9a623d
CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685) https://reviews.apache.org/r/11157/ Signed-off-by: Chip Childers <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e6af3bf1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e6af3bf1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e6af3bf1 Branch: refs/heads/4.1 Commit: e6af3bf112f33a8e02eb6d964ce799e6f30447e0 Parents: 48fc5c8 Author: Wei Zhou <[email protected]> Authored: Wed May 15 15:54:03 2013 +0100 Committer: Chip Childers <[email protected]> Committed: Wed May 15 15:54:03 2013 +0100 ---------------------------------------------------------------------- .../router/VirtualNetworkApplianceManagerImpl.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e6af3bf1/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 8b75b00..57f9493 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -3693,6 +3693,11 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V stats.setNetBytesSent(stats.getNetBytesSent() + stats.getCurrentBytesSent()); } stats.setCurrentBytesSent(answer.getBytesSent()); + if (! _dailyOrHourly) { + //update agg bytes + stats.setAggBytesSent(stats.getNetBytesSent() + stats.getCurrentBytesSent()); + stats.setAggBytesReceived(stats.getNetBytesReceived() + stats.getCurrentBytesReceived()); + } _userStatsDao.update(stats.getId(), stats); txn.commit(); } catch (Exception e) {
