]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 217730 via svnmerge from
authorMatthias Nick <mnick@digium.com>
Thu, 10 Sep 2009 19:53:41 +0000 (19:53 +0000)
committerMatthias Nick <mnick@digium.com>
Thu, 10 Sep 2009 19:53:41 +0000 (19:53 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@217736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index c0076209a7b8db3cec7d2aa7ab327da145402a89..1eb8d10df800a460e3665efdf8200f26e43330ec 100644 (file)
@@ -362,14 +362,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);
+               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 =