[Asterisk-cvs] asterisk channel.c,1.197,1.198

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun Jun 5 10:29:58 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv1489

Modified Files:
	channel.c 
Log Message:
make 'show channeltypes' list whether device state is supported (bug #4464)


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -d -r1.197 -r1.198
--- channel.c	3 Jun 2005 01:42:31 -0000	1.197
+++ channel.c	5 Jun 2005 14:32:32 -0000	1.198
@@ -81,16 +81,16 @@
 
 static int show_channeltypes(int fd, int argc, char *argv[])
 {
-#define FORMAT  "%-10.10s  %-50.50s\n"
+#define FORMAT  "%-10.10s  %-50.50s %-12.12s\n"
 	struct chanlist *cl = backends;
-	ast_cli(fd, FORMAT, "Type", "Description");
-	ast_cli(fd, FORMAT, "----------", "-----------");
+	ast_cli(fd, FORMAT, "Type", "Description",       "Devicestate");
+	ast_cli(fd, FORMAT, "----------", "-----------", "-----------");
 	if (ast_mutex_lock(&chlock)) {
 		ast_log(LOG_WARNING, "Unable to lock channel list\n");
 		return -1;
 	}
 	while (cl) {
-		ast_cli(fd, FORMAT, cl->tech->type, cl->tech->description);
+		ast_cli(fd, FORMAT, cl->tech->type, cl->tech->description, (cl->tech->devicestate)?"yes":"no");
 		cl = cl->next;
 	}
 	ast_mutex_unlock(&chlock);




More information about the svn-commits mailing list