[asterisk-commits] rmudgett: branch 10 r367470 - in /branches/10: ./ main/pbx.c

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


Author: rmudgett
Date: Wed May 23 18:16:49 2012
New Revision: 367470

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367470
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.
........

Merged revisions 367469 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/main/pbx.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/pbx.c?view=diff&rev=367470&r1=367469&r2=367470
==============================================================================
--- branches/10/main/pbx.c (original)
+++ branches/10/main/pbx.c Wed May 23 18:16:49 2012
@@ -9834,7 +9834,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