diff options
author | 2016-03-03 18:10:29 +0200 | |
---|---|---|
committer | 2016-03-03 18:11:08 +0200 | |
commit | f749b4358cfedd1ef7e0b58f69f63ee4d00554ea (patch) | |
tree | d9d87a4480eacfb290cef25ede72a37880198cb5 /src | |
parent | 13cfb2c4ea55b7e0dab40155d8d51e7955ae4681 (diff) |
RX stats example "stl_rx_stream.py"
Diffstat (limited to 'src')
-rw-r--r-- | src/flow_stat.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp index 7f9df8c7..5c3c7462 100644 --- a/src/flow_stat.cpp +++ b/src/flow_stat.cpp @@ -647,7 +647,8 @@ bool CFlowStatRuleMgr::dump_json(std::string & json) { std::string str_user_id = static_cast<std::ostringstream*>( &(std::ostringstream() << user_id) )->str(); for (uint8_t port = 0; port < m_num_ports; port++) { - std::string str_port = static_cast<std::ostringstream*>( &(std::ostringstream() << port) )->str(); + std::string str_port = static_cast<std::ostringstream*>( &(std::ostringstream() << int(port) ) )->str(); + if (user_id_info->get_rx_counter(port) != 0) { data_section[str_user_id]["rx-pkts"][str_port] = Json::Value::UInt64(user_id_info->get_rx_counter(port)); ret = true; |