From 7b78740c6e5e4ad585d36c157333b8c5018dcc82 Mon Sep 17 00:00:00 2001 From: Super User Date: Sat, 7 Jul 2007 21:36:16 +0200 Subject: backup runs, dialtone, but still buggy --- trace.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'trace.c') diff --git a/trace.c b/trace.c index e5e9a2e..43ba441 100644 --- a/trace.c +++ b/trace.c @@ -124,8 +124,9 @@ static char *print_trace(int detail, int port, char *interface, char *caller, ch /* head */ if (detail >= 3) { + SCAT(trace_string, "------------------------------------------------------------------------------\n"); /* "Port: 1 (BRI PTMP TE)" */ - if (port) + if (trace.port) { mISDNport = mISDNport_first; while(mISDNport) @@ -135,9 +136,13 @@ static char *print_trace(int detail, int port, char *interface, char *caller, ch mISDNport = mISDNport->next; } if (mISDNport) - SPRINT(buffer, "Port: %d (%s %s %s)", port, (mISDNport->pri)?"PRI":"BRI", (mISDNport->ptp)?"PTP":"PTMP", (mISDNport->ntmode)?"NT":"TE"); - else - SPRINT(buffer, "Port: %d (does not exist}\n", port); + { + SPRINT(buffer, "Port: %d (%s %s %s)", trace.port, (mISDNport->pri)?"PRI":"BRI", (mISDNport->ptp)?"PTP":"PTMP", (mISDNport->ntmode)?"NT":"TE"); + /* copy interface, if we have a port */ + if (mISDNport->ifport) if (mISDNport->ifport->interface) + SCPY(trace.interface, mISDNport->ifport->interface->name); + } else + SPRINT(buffer, "Port: %d (does not exist)\n", trace.port); SCAT(trace_string, buffer); } else SCAT(trace_string, "Port: ---"); -- cgit v1.2.3-55-g7522