Package: asterisk / 1:1.6.2.9-2+squeeze12

dahdi_pri_debug_spannums Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Subject: Print span number (when available) on PRI trace messages
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Bug: http://issues.asterisk.org/view.php?id=15054
Origin: backport, http://svn.digium.com/view/asterisk?view=rev&revision=225836
Last-Update: 2009-12-19

This allows tracing ("pri debug" / "pri set debug") more than one span at
a time in a sane manner.

Fix included in Asterisk 1.8 but not in 1.6.2 .

--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -12237,6 +12237,8 @@ static void dahdi_pri_message(struct pri
 		}
 		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
@@ -12278,6 +12280,8 @@ static void dahdi_pri_error(struct pri *
 		}
 		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