summaryrefslogtreecommitdiffstats
path: root/zebra/label_manager.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-07-17 02:17:05 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-07-17 02:30:55 +0200
commit8f86bb067ee9a7f5080da1406b9d03ce3dff884e (patch)
tree3d62d4b472d966b6b0c1de564995df247d362a02 /zebra/label_manager.c
parentMerge pull request #4685 from chiragshah6/ospf_vrf_dev (diff)
downloadfrr-8f86bb067ee9a7f5080da1406b9d03ce3dff884e.tar.xz
frr-8f86bb067ee9a7f5080da1406b9d03ce3dff884e.zip
zebra: Guard debug messages
A bunch of debug code has snuck in that is unguarded. Fix this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/label_manager.c')
-rw-r--r--zebra/label_manager.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index 03cfa572d..6e58f4b92 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -39,6 +39,7 @@
#include "zebra/label_manager.h"
#include "zebra/zebra_errors.h"
#include "zebra/zapi_msg.h"
+#include "zebra/debug.h"
#define CONNECTION_DELAY 5
@@ -116,8 +117,9 @@ int release_daemon_label_chunks(uint8_t proto, unsigned short instance)
int count = 0;
int ret;
- zlog_debug("%s: Releasing chunks for client proto %s, instance %d",
- __func__, zebra_route_string(proto), instance);
+ if (IS_ZEBRA_DEBUG_PACKET)
+ zlog_debug("%s: Releasing chunks for client proto %s, instance %d",
+ __func__, zebra_route_string(proto), instance);
for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) {
if (lmc->proto == proto && lmc->instance == instance
@@ -129,7 +131,8 @@ int release_daemon_label_chunks(uint8_t proto, unsigned short instance)
}
}
- zlog_debug("%s: Released %d label chunks", __func__, count);
+ if (IS_ZEBRA_DEBUG_PACKET)
+ zlog_debug("%s: Released %d label chunks", __func__, count);
return count;
}
@@ -371,7 +374,8 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
int ret = -1;
/* check that size matches */
- zlog_debug("Releasing label chunk: %u - %u", start, end);
+ if (IS_ZEBRA_DEBUG_PACKET)
+ zlog_debug("Releasing label chunk: %u - %u", start, end);
/* find chunk and disown */
for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) {
if (lmc->start != start)