aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authormnick <mnick@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-10 19:56:30 +0000
committermnick <mnick@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-10 19:56:30 +0000
commitea690e3135197d1da97891f20caf662c5510a0c6 (patch)
tree03b871527478f5fabc2923bd4760c94699ccb89b /res/res_musiconhold.c
parenta70eed0cbe98b8dcd5f4bf8a0a30d05f9df0b8bd (diff)
Merged revisions 217730 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r217730 | mnick | 2009-09-10 14:39:41 -0500 (Thu, 10 Sep 2009) | 17 lines Sets the correct musicclass after an announcement (closes issue #15279) Reported by: mbeckwell Patches: patch.txt uploaded by mnick (license ) Tested by: mnick (closes issue #15832) Reported by: mbeckwell Patches: patch.txt uploaded by mnick (license 874) Tested by: mnick ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@217739 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 6346f6c6e..69b2d6c62 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -360,14 +360,10 @@ static void moh_handle_digit(struct ast_channel *chan, char digit)
if ((class = get_mohbydigit(digit))) {
classname = ast_strdupa(class->name);
class = mohclass_unref(class, "Unreffing ao2_find from finding by digit");
+ ast_string_field_set(chan,musicclass,classname);
+ ast_moh_stop(chan);
+ ast_moh_start(chan, classname, NULL);
}
-
- if (!class) {
- return;
- }
-
- ast_moh_stop(chan);
- ast_moh_start(chan, classname, NULL);
}
static struct ast_generator moh_file_stream =