From b16884f98f3a2fec283c97fc3a5475e3a740643a Mon Sep 17 00:00:00 2001 From: harti Date: Fri, 18 Jul 2003 11:17:04 +0000 Subject: [PATCH] Don't call print_pdu() when we are not debugging. This would result in calling fprintf() with a NULL fp. Strange enough this didn't result in cores in stable, but results in cores now. MFC after: 2 weeks --- sbin/atm/ilmid/ilmid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/atm/ilmid/ilmid.c b/sbin/atm/ilmid/ilmid.c index ba7f170dc91f..230b9c32b6b8 100644 --- a/sbin/atm/ilmid/ilmid.c +++ b/sbin/atm/ilmid/ilmid.c @@ -2475,7 +2475,8 @@ ilmi_do_state(void) bpp = (caddr_t)&buf[1]; Hdr = asn_get_header(&bpp); - print_pdu(PDU_RECV, intf, Hdr, n, buf); + if ( Log && Debug_Level > 1 ) + print_pdu(PDU_RECV, intf, Hdr, n, buf); if (Hdr == NULL) continue;