pimd: Cleanup zebra debugs to be protected by debug commands
pimd is very chatty without any pim debugs turned on.
This commit fixes a bunch of the debugs to be protected
by appropriate pim debug statement.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index e253a0e..e801f4e 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -103,9 +103,11 @@
enum pim_ifjoin_state old_state = ch->ifjoin_state;
if (old_state == new_state) {
- zlog_debug("%s calledby %s: non-transition on state %d (%s)",
- __PRETTY_FUNCTION__, caller, new_state,
- pim_ifchannel_ifjoin_name(new_state));
+ if (PIM_DEBUG_PIM_EVENTS) {
+ zlog_debug("%s calledby %s: non-transition on state %d (%s)",
+ __PRETTY_FUNCTION__, caller, new_state,
+ pim_ifchannel_ifjoin_name(new_state));
+ }
return;
}
@@ -286,7 +288,7 @@
if (ch->local_ifmembership == membership)
return;
- /* if (PIM_DEBUG_PIM_EVENTS) */ {
+ if (PIM_DEBUG_PIM_EVENTS) {
char src_str[100];
char grp_str[100];
pim_inet4_dump("<src?>", ch->source_addr, src_str, sizeof(src_str));