[asterisk-commits] crichter: trunk r100795 - in /trunk: ./ channels/chan_misdn.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 29 04:50:29 CST 2008


Author: crichter
Date: Tue Jan 29 04:50:29 2008
New Revision: 100795

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100795
Log:
Merged revisions 100793 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100793 | crichter | 2008-01-29 11:36:19 +0100 (Di, 29 Jan 2008) | 1 line

fixed potential segfault in misdn show channels CLI command
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_misdn.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=100795&r1=100794&r2=100795
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Tue Jan 29 04:50:29 2008
@@ -1251,10 +1251,19 @@
 	help = cl_te;
   
 	ast_cli(a->fd, "Channel List: %p\n", cl_te); 
-  
+
 	for (; help; help = help->next) {
 		struct misdn_bchannel *bc = help->bc;   
 		struct ast_channel *ast = help->ast;
+		if (!ast) {
+			if (!bc) {
+				ast_cli(a->fd, "chan_list obj. with l3id:%x has no bc and no ast Leg\n", help->l3id);
+				continue;
+			}
+			ast_cli(a->fd, "bc with pid:%d has no Ast Leg\n", bc->pid);
+			continue;
+		}
+
 		if (misdn_debug[0] > 2)
 			ast_cli(a->fd, "Bc:%p Ast:%p\n", bc, ast);
 		if (bc) {




More information about the asterisk-commits mailing list