summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-26 13:29:54 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-10-26 13:29:54 +0000
commit2736168a6b1f9959704eed4a55376df391b4fa56 (patch)
tree33ad0ae6726db1f6fe177e06cb761341a40c2cc4 /channels
parente5a57959eb877520fae8fd7db5eeebc8c5ae14e4 (diff)
span numbers in pri debug / error messages
Prefix PRI trace messages with the span number. This makes the trace readable even when you have a multi-port device. (closes issue #15054) Reported by: tzafrir Patches: dahdi_pri_debug_spannum.diff uploaded by tzafrir (license 46) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index ff48aea6b..e51747211 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -13126,6 +13126,8 @@ static void dahdi_pri_message(struct pri *pri, char *s)
}
if (dchancount > 1 && (span > -1))
ast_verbose("[Span %d D-Channel %d]%s", span, dchan, s);
+ else if (span > -1)
+ ast_verbose("%d %s", span+1, s);
else
ast_verbose("%s", s);
} else
@@ -13167,6 +13169,8 @@ static void dahdi_pri_error(struct pri *pri, char *s)
}
if ((dchancount > 1) && (span > -1))
ast_log(LOG_ERROR, "[Span %d D-Channel %d] PRI: %s", span, dchan, s);
+ else if (span > -1)
+ ast_log(LOG_ERROR, "%d %s", span+1, s);
else
ast_log(LOG_ERROR, "%s", s);
} else