Skip to content

Commit

Permalink
Fix Graphite code
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-odintsov committed May 11, 2015
1 parent 7170f25 commit 1344f2f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/fastnetmon.cpp
Expand Up @@ -513,12 +513,14 @@ std::string draw_table(map_for_counters& my_map_packets, direction data_directio
element_number++;
}

bool graphite_put_result = store_data_to_graphite(graphite_port, graphite_host, graphite_data);
if (graphite_enabled) {
bool graphite_put_result = store_data_to_graphite(graphite_port, graphite_host, graphite_data);

if (!graphite_put_result) {
logger<< log4cpp::Priority::ERROR<<"Can't store data to Graphite";
if (!graphite_put_result) {
logger<< log4cpp::Priority::ERROR<<"Can't store data to Graphite";
}
}

return output_buffer.str();
}

Expand Down

0 comments on commit 1344f2f

Please sign in to comment.