summaryrefslogtreecommitdiff
path: root/isisd/isis_lsp.c
diff options
context:
space:
mode:
authorhasso <hasso>2005-09-04 21:36:36 +0000
committerhasso <hasso>2005-09-04 21:36:36 +0000
commitc89c05dd04d097bd8213125a42d67204bb681de5 (patch)
treeb8bde80fab9ea45f035edcb71ce1795abcb039c8 /isisd/isis_lsp.c
parentc0fb2a52150ece6042181ab49fafc12b3ba07870 (diff)
* *.c: Try to be less verbose by default (without any debug options
on). * isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of touching endp directly. * isis_lsp.c (lsp_build_pseudo): Ditto.
Diffstat (limited to 'isisd/isis_lsp.c')
-rw-r--r--isisd/isis_lsp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index cb7b93b4..2a9d1465 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -501,13 +501,11 @@ lsp_new (u_char * lsp_id, u_int16_t rem_lifetime, u_int32_t seq_num,
stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
- /* #ifdef EXTREME_DEBUG */
- /* logging */
- zlog_debug ("New LSP with ID %s-%02x-%02x seqnum %08x", sysid_print (lsp_id),
- LSP_PSEUDO_ID (lsp->lsp_header->lsp_id),
- LSP_FRAGMENT (lsp->lsp_header->lsp_id),
- ntohl (lsp->lsp_header->seq_num));
- /* #endif EXTREME DEBUG */
+ if (isis->debugs & DEBUG_EVENTS)
+ zlog_debug ("New LSP with ID %s-%02x-%02x seqnum %08x",
+ sysid_print (lsp_id), LSP_PSEUDO_ID (lsp->lsp_header->lsp_id),
+ LSP_FRAGMENT (lsp->lsp_header->lsp_id),
+ ntohl (lsp->lsp_header->seq_num));
return lsp;
}
@@ -1302,7 +1300,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area)
/* Reset stream endp. Stream is always there and on every LSP refresh only
* TLV part of it is overwritten. So we must seek past header we will not
* touch. */
- lsp->pdu->endp = 0;
+ stream_reset (lsp->pdu);
stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
/*
@@ -1912,7 +1910,7 @@ lsp_build_pseudo (struct isis_lsp *lsp, struct isis_circuit *circuit,
}
/* Reset endp of stream to overwrite only TLV part of it. */
- lsp->pdu->endp = 0;
+ stream_reset (lsp->pdu);
stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
/*