mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 01:47:29 +00:00
lib: Fix debugs to be guarded.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
6be4da3dfa
commit
08c08a35c6
@ -1486,7 +1486,9 @@ lm_label_manager_connect (struct zclient *zclient)
|
|||||||
vrf_id_t vrf_id;
|
vrf_id_t vrf_id;
|
||||||
u_int16_t cmd;
|
u_int16_t cmd;
|
||||||
|
|
||||||
zlog_debug ("Connecting to Label Manager");
|
if (zclient_debug)
|
||||||
|
zlog_debug ("Connecting to Label Manager");
|
||||||
|
|
||||||
if (zclient->sock < 0)
|
if (zclient->sock < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -1518,7 +1520,8 @@ lm_label_manager_connect (struct zclient *zclient)
|
|||||||
zclient->sock = -1;
|
zclient->sock = -1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
zlog_debug ("%s: Label manager connect request (%d bytes) sent", __func__, ret);
|
if (zclient_debug)
|
||||||
|
zlog_debug ("%s: Label manager connect request (%d bytes) sent", __func__, ret);
|
||||||
|
|
||||||
/* read response */
|
/* read response */
|
||||||
s = zclient->ibuf;
|
s = zclient->ibuf;
|
||||||
@ -1532,8 +1535,9 @@ lm_label_manager_connect (struct zclient *zclient)
|
|||||||
}
|
}
|
||||||
/* result */
|
/* result */
|
||||||
result = stream_getc(s);
|
result = stream_getc(s);
|
||||||
zlog_debug ("%s: Label Manager connect response (%d bytes) received, result %u",
|
if (zclient_debug)
|
||||||
__func__, size, result);
|
zlog_debug ("%s: Label Manager connect response (%d bytes) received, result %u",
|
||||||
|
__func__, size, result);
|
||||||
|
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
@ -1564,7 +1568,9 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size,
|
|||||||
u_int16_t cmd;
|
u_int16_t cmd;
|
||||||
u_char response_keep;
|
u_char response_keep;
|
||||||
|
|
||||||
zlog_debug ("Getting Label Chunk");
|
if (zclient_debug)
|
||||||
|
zlog_debug ("Getting Label Chunk");
|
||||||
|
|
||||||
if (zclient->sock < 0)
|
if (zclient->sock < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -1594,7 +1600,8 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size,
|
|||||||
zclient->sock = -1;
|
zclient->sock = -1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
zlog_debug ("%s: Label chunk request (%d bytes) sent", __func__, ret);
|
if (zclient_debug)
|
||||||
|
zlog_debug ("%s: Label chunk request (%d bytes) sent", __func__, ret);
|
||||||
|
|
||||||
/* read response */
|
/* read response */
|
||||||
s = zclient->ibuf;
|
s = zclient->ibuf;
|
||||||
@ -1606,7 +1613,9 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size,
|
|||||||
zlog_err ("%s: Invalid Get Label Chunk Message Reply Header", __func__);
|
zlog_err ("%s: Invalid Get Label Chunk Message Reply Header", __func__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
zlog_debug ("%s: Label chunk response (%d bytes) received", __func__, size);
|
if (zclient_debug)
|
||||||
|
zlog_debug ("%s: Label chunk response (%d bytes) received", __func__, size);
|
||||||
|
|
||||||
/* keep */
|
/* keep */
|
||||||
response_keep = stream_getc(s);
|
response_keep = stream_getc(s);
|
||||||
/* start and end labels */
|
/* start and end labels */
|
||||||
@ -1627,8 +1636,9 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
zlog_debug ("Label Chunk assign: %u - %u (%u) ",
|
if (zclient_debug)
|
||||||
*start, *end, response_keep);
|
zlog_debug ("Label Chunk assign: %u - %u (%u) ",
|
||||||
|
*start, *end, response_keep);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1647,7 +1657,9 @@ lm_release_label_chunk (struct zclient *zclient, uint32_t start, uint32_t end)
|
|||||||
int ret;
|
int ret;
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
|
|
||||||
zlog_debug ("Releasing Label Chunk");
|
if (zclient_debug)
|
||||||
|
zlog_debug ("Releasing Label Chunk");
|
||||||
|
|
||||||
if (zclient->sock < 0)
|
if (zclient->sock < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user