[asterisk-commits] rmudgett: branch 1.8 r367469 - /branches/1.8/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 23 18:08:19 CDT 2012


Author: rmudgett
Date: Wed May 23 18:08:14 2012
New Revision: 367469

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367469
Log:
Fix WaitExten(x,m(musicclass)) string termination.

The AST_CONTROL_HOLD MOH class from the WaitExten application can now be
queued onto a channel, passed over local channels with the /m option, and
passed over IAX channels.

Modified:
    branches/1.8/main/pbx.c

Modified: branches/1.8/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/pbx.c?view=diff&rev=367469&r1=367468&r2=367469
==============================================================================
--- branches/1.8/main/pbx.c (original)
+++ branches/1.8/main/pbx.c Wed May 23 18:08:14 2012
@@ -9675,7 +9675,8 @@
 	if (ast_test_flag(&flags, WAITEXTEN_MOH) && !opts[0] ) {
 		ast_log(LOG_WARNING, "The 'm' option has been specified for WaitExten without a class.\n"); 
 	} else if (ast_test_flag(&flags, WAITEXTEN_MOH)) {
-		ast_indicate_data(chan, AST_CONTROL_HOLD, S_OR(opts[0], NULL), strlen(opts[0]));
+		ast_indicate_data(chan, AST_CONTROL_HOLD, S_OR(opts[0], NULL),
+			!ast_strlen_zero(opts[0]) ? strlen(opts[0]) + 1 : 0);
 	} else if (ast_test_flag(&flags, WAITEXTEN_DIALTONE)) {
 		struct ast_tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial");
 		if (ts) {




More information about the asterisk-commits mailing list