From c89c05dd04d097bd8213125a42d67204bb681de5 Mon Sep 17 00:00:00 2001 From: hasso Date: Sun, 4 Sep 2005 21:36:36 +0000 Subject: * *.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. --- isisd/isis_lsp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'isisd/isis_lsp.c') 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); /* -- cgit v1.2.1