[asterisk-commits] crichter: branch 1.4 r100793 - /branches/1.4/channels/chan_misdn.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 29 04:36:19 CST 2008
Author: crichter
Date: Tue Jan 29 04:36:19 2008
New Revision: 100793
URL: http://svn.digium.com/view/asterisk?view=rev&rev=100793
Log:
fixed potential segfault in misdn show channels CLI command
Modified:
branches/1.4/channels/chan_misdn.c
Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=100793&r1=100792&r2=100793
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Tue Jan 29 04:36:19 2008
@@ -1127,10 +1127,18 @@
struct chan_list *help=cl_te;
ast_cli(fd,"Chan 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(fd, "chan_list obj. with l3id:%x has no bc and no ast Leg\n", help->l3id);
+ continue;
+ }
+ ast_cli(fd, "bc with pid:%d has no Ast Leg\n", bc->pid);
+ continue;
+ }
if (misdn_debug[0] > 2) ast_cli(fd, "Bc:%p Ast:%p\n", bc, ast);
if (bc) {
print_bc_info(fd, help, bc);
More information about the asterisk-commits
mailing list