summaryrefslogtreecommitdiff
path: root/lib/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/debug.c')
-rw-r--r--lib/debug.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/debug.c b/lib/debug.c
index 485e29a..4544f3c 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -14,8 +14,11 @@
void
rs_dump_packet (const struct rs_packet *pkt)
{
- const RADIUS_PACKET *p = pkt->rpkt;
- assert(p);
+ const RADIUS_PACKET *p = NULL;
+
+ if (!pkt || !pkt->rpkt)
+ return;
+ p = pkt->rpkt;
fprintf (stderr, "\tCode: %u, Identifier: %u, Lenght: %u\n",
p->code,
@@ -32,7 +35,7 @@ rs_dump_attr (const struct rs_attr *attr)
#if defined DEBUG
int
-rs_debug (const char *fmt, ...)
+_rs_debug (const char *fmt, ...)
{
int n;
va_list args;