Skip to content

Commit

Permalink
Prevent duplicate PMNS names (related to issue pcolby#19).
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Feb 5, 2014
1 parent f5790f3 commit 34cf1a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/pcp-cpp/pmda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,11 @@ class pmda {
<< cluster_iter->first << std::endl;
}
} else {
stream << " " << cluster_name << std::endl;
static std::string previous_cluster_name;
if (cluster_name != previous_cluster_name) {
stream << " " << cluster_name << std::endl;
previous_cluster_name = cluster_name;
}
}
}
stream << '}' << std::endl;
Expand Down

0 comments on commit 34cf1a0

Please sign in to comment.