#include "bgpd/bgpd.h"
#include "bgpd/bgp_labelpool.h"
#include "bgpd/bgp_debug.h"
+#include "bgpd/bgp_errors.h"
/*
* Definitions and external declarations.
if (lcbq->label == MPLS_LABEL_NONE) {
/* shouldn't happen */
- zlog_err("%s: error: label==MPLS_LABEL_NONE", __func__);
+ flog_err(BGP_ERR_LABEL, "%s: error: label==MPLS_LABEL_NONE",
+ __func__);
return WQ_SUCCESS;
}
lp->requests = XCALLOC(MTYPE_BGP_LABEL_FIFO, sizeof(struct lp_fifo));
LABEL_FIFO_INIT(lp->requests);
lp->callback_q = work_queue_new(master, "label callbacks");
- if (!lp->callback_q) {
- zlog_err("%s: Failed to allocate work queue", __func__);
- exit(1);
- }
lp->callback_q->spec.workfunc = lp_cbq_docallback;
lp->callback_q->spec.del_item_data = lp_cbq_item_free;
if (rc) {
/* shouldn't happen */
- zlog_err("%s: can't insert new LCB into ledger list",
- __func__);
+ flog_err(BGP_ERR_LABEL,
+ "%s: can't insert new LCB into ledger list",
+ __func__);
XFREE(MTYPE_BGP_LABEL_CB, lcb);
return;
}
struct lp_fifo *lf;
if (last < first) {
- zlog_err("%s: zebra label chunk invalid: first=%u, last=%u",
- __func__, first, last);
+ flog_err(BGP_ERR_LABEL,
+ "%s: zebra label chunk invalid: first=%u, last=%u",
+ __func__, first, last);
return;
}