summaryrefslogtreecommitdiffstats
path: root/src/flow_stat.cpp
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-04-10 17:23:55 +0300
committerHanoh Haim <hhaim@cisco.com>2016-04-10 17:23:55 +0300
commit4aab694dd856865fd4497cd8249bb68fcf9970dd (patch)
tree63c902775f06f7b7945c675d2fb34186ed3aeb19 /src/flow_stat.cpp
parent392f47fb7956b108c36d45c37b52cb4b2c91091f (diff)
parentf067afcd24731aca892fa03ec3a5eaf48fe6f68d (diff)
Merge trex-197 bug fix
Diffstat (limited to 'src/flow_stat.cpp')
-rw-r--r--src/flow_stat.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp
index 13f8eb16..10b0c3ea 100644
--- a/src/flow_stat.cpp
+++ b/src/flow_stat.cpp
@@ -845,7 +845,8 @@ bool CFlowStatRuleMgr::dump_json(std::string & json, bool baseline) {
if (user_id_info->need_to_send_rx(port) || baseline) {
user_id_info->set_no_need_to_send_rx(port);
data_section[str_user_id]["rx_pkts"][str_port] = Json::Value::UInt64(user_id_info->get_rx_counter(port).get_pkts());
- data_section[str_user_id]["rx_bytes"][str_port] = Json::Value::UInt64(user_id_info->get_rx_counter(port).get_bytes());
+ if (m_capabilities & TrexPlatformApi::IF_STAT_RX_BYTES_COUNT)
+ data_section[str_user_id]["rx_bytes"][str_port] = Json::Value::UInt64(user_id_info->get_rx_counter(port).get_bytes());
send_empty = false;
}
if (user_id_info->need_to_send_tx(port) || baseline) {