[asterisk-commits] russell: branch 1.4 r164876 - /branches/1.4/apps/app_macro.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 16 15:10:45 CST 2008


Author: russell
Date: Tue Dec 16 15:10:44 2008
New Revision: 164876

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164876
Log:
Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)

Modified:
    branches/1.4/apps/app_macro.c

Modified: branches/1.4/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_macro.c?view=diff&rev=164876&r1=164875&r2=164876
==============================================================================
--- branches/1.4/apps/app_macro.c (original)
+++ branches/1.4/apps/app_macro.c Tue Dec 16 15:10:44 2008
@@ -322,8 +322,8 @@
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
 				else if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
+				dead = 1;
 				goto out;
-				break;
 			default:
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);




More information about the asterisk-commits mailing list