]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Ensure that all ConfBridge sounds can be set using CONFBRIDGE function
authorMatthew Jordan <mjordan@digium.com>
Thu, 20 Sep 2012 02:35:13 +0000 (02:35 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 20 Sep 2012 02:35:13 +0000 (02:35 +0000)
The CONFBRIDGE function can be used to set the sounds in a ConfBridge
bridge profile.  Unfortunately, three sounds were missed in the portion
of the code that applies the settings passed in from the function:
sound_only_one, join, and leave.  This patch makes sure that the sounds
passed from the function are applied to the bridge profile.

(closes issue ASTERISK-20404)
Reported by: univ
Tested by: mjordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@373196 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/confbridge/conf_config_parser.c

index 78fd02c354e4488a3446e41b5d3c586fc30e251d..234b86a3dcd4a60ad62b0517a3a85685ec83b7ea 100644 (file)
@@ -325,6 +325,7 @@ static int set_bridge_option(const char *name, const char *value, struct bridge_
                 * structure of a dynamic profile will need to be altered, a completely new sounds structure must be
                 * create instead of simply holding a reference to the one built by the config file. */
                ast_string_field_set(sounds, onlyperson, tmp->sounds->onlyperson);
+               ast_string_field_set(sounds, onlyone, tmp->sounds->onlyone);
                ast_string_field_set(sounds, hasjoin, tmp->sounds->hasjoin);
                ast_string_field_set(sounds, hasleft, tmp->sounds->hasleft);
                ast_string_field_set(sounds, kicked, tmp->sounds->kicked);
@@ -341,6 +342,8 @@ static int set_bridge_option(const char *name, const char *value, struct bridge_
                ast_string_field_set(sounds, unlockednow, tmp->sounds->unlockednow);
                ast_string_field_set(sounds, lockednow, tmp->sounds->lockednow);
                ast_string_field_set(sounds, errormenu, tmp->sounds->errormenu);
+               ast_string_field_set(sounds, join, tmp->sounds->join);
+               ast_string_field_set(sounds, leave, tmp->sounds->leave);
 
                ao2_ref(tmp->sounds, -1); /* sounds struct copied over to it from the template by reference only. */
                ao2_ref(oldsounds,-1);    /* original sounds struct we don't need anymore */