[asterisk-commits] rizzo: trunk r47880 - /trunk/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 21 04:07:31 MST 2006


Author: rizzo
Date: Tue Nov 21 05:07:30 2006
New Revision: 47880

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47880
Log:
do not ast_hangup() on a NULL channel.
In the original code this would happen in the case of
	o->forwards >=  AST_MAX_FORWARDS

Likely an 1.2/1.4 isse as well - please someone have a look,
while I am hunting a few more similar panics now.


Modified:
    trunk/apps/app_dial.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=47880&r1=47879&r2=47880
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Nov 21 05:07:30 2006
@@ -505,9 +505,9 @@
 				ast_set_callerid(c, S_OR(in->macroexten, in->exten), get_cid_name(cidname, sizeof(cidname), in), NULL);
 			}
 		}
-	}
-	/* Hangup the original channel now, in case we needed it */
-	ast_hangup(c);
+		/* Hangup the original channel now, in case we needed it */
+		ast_hangup(c);
+	}
 }
 
 /* argument used for some functions. */



More information about the asterisk-commits mailing list