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/3fa8fda3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3fa8fda3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3fa8fda3

Branch: refs/heads/object_store
Commit: 3fa8fda37c8b9fac1e38b57d28d23917106fe02b
Parents: 21cb2c6
Author: Wei Zhou <[email protected]>
Authored: Wed May 15 15:54:03 2013 +0100
Committer: Edison Su <[email protected]>
Committed: Wed May 15 19:41:49 2013 -0700

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManagerImpl.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fa8fda3/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 5de2388..b8ad29f 100755
--- 
a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ 
b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -3957,6 +3957,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) {

Reply via email to