[asterisk-commits] rmudgett: branch rmudgett/bch_shift_trunk r311749 - /team/rmudgett/bch_shift_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 28 16:19:44 CDT 2011


Author: rmudgett
Date: Mon Mar 28 16:19:40 2011
New Revision: 311749

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311749
Log:
Update 'pri show channels' with channel available column.

Modified:
    team/rmudgett/bch_shift_trunk/channels/sig_pri.c

Modified: team/rmudgett/bch_shift_trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_trunk/channels/sig_pri.c?view=diff&rev=311749&r1=311748&r2=311749
==============================================================================
--- team/rmudgett/bch_shift_trunk/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_trunk/channels/sig_pri.c Mon Mar 28 16:19:40 2011
@@ -8546,12 +8546,12 @@
 	ast_free(doomed);
 }
 
-#define SIG_PRI_SC_HEADER	"%-4s %4s %-4s %-10s %-4s %s\n"
-#define SIG_PRI_SC_LINE		"%4d %4d %-4s %-10s %-4s %s"
+#define SIG_PRI_SC_HEADER	"%-4s %4s %-4s %-4s %-10s %s\n"
+#define SIG_PRI_SC_LINE		 "%4d %4d %-4s %-4s %-10s %s"
 void sig_pri_cli_show_channels_header(int fd)
 {
-	ast_cli(fd, SIG_PRI_SC_HEADER, "PRI",  "",     "B",    "Call",  "PRI",  "Channel");
-	ast_cli(fd, SIG_PRI_SC_HEADER, "Span", "Chan", "Chan", "Level", "Call", "Name");
+	ast_cli(fd, SIG_PRI_SC_HEADER, "PRI",  "",     "B",    "Chan", "Call",  "Channel");
+	ast_cli(fd, SIG_PRI_SC_HEADER, "Span", "Chan", "Chan", "Idle", "Level", "Name");
 }
 
 void sig_pri_cli_show_channels(int fd, struct sig_pri_span *pri)
@@ -8568,7 +8568,7 @@
 		pvt = pri->pvts[idx];
 		sig_pri_lock_private(pvt);
 		sig_pri_lock_owner(pri, idx);
-		if (pvt->no_b_channel && !pvt->call && !pvt->owner) {
+		if (pvt->no_b_channel && sig_pri_is_chan_available(pvt)) {
 			/* Don't show held/call-waiting channels if they are not in use. */
 			sig_pri_unlock_private(pvt);
 			continue;
@@ -8578,8 +8578,8 @@
 			pri->span,
 			pvt->channel,
 			pvt->no_b_channel ? "No" : "Yes",/* Has media */
+			sig_pri_is_chan_available(pvt) ? "Yes" : "No",
 			sig_pri_call_level2str(pvt->call_level),
-			pvt->call ? "Yes" : "No",
 			pvt->owner ? pvt->owner->name : "");
 
 		if (pvt->owner) {




More information about the asterisk-commits mailing list