diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-05-23 23:22:42 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-05-23 23:22:42 +0000 |
commit | e434a456cd060b287be2be78829aa15d0c140e30 (patch) | |
tree | cba0e033e00bbef055cabd8772daf68e2aa6f6d5 /main/pbx.c | |
parent | a1da70097ddf8d59e207ac023bca8473372d3427 (diff) |
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
........
Merged revisions 367470 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index 5fe981d57..bdaea7288 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -9920,7 +9920,8 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, const char *data) 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(ast_channel_zone(chan), "dial"); if (ts) { |