]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix empty +flags{} pre-empting conference_member_flags variable
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Jun 2013 21:04:28 +0000 (16:04 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Jun 2013 21:04:38 +0000 (16:04 -0500)
src/mod/applications/mod_conference/mod_conference.c

index 5df93f60b92dff15694603cd948acd7c1bf2d75c..50bf670aadd0d3b6096475285f0567615cb8d982 100644 (file)
@@ -7354,7 +7354,7 @@ SWITCH_STANDARD_APP(conference_function)
        char *bridgeto = NULL;
        char *profile_name = NULL;
        switch_xml_t cxml = NULL, cfg = NULL, profiles = NULL;
-       const char *flags_str;
+       const char *flags_str, *v_flags_str;
        member_flag_t mflags = 0;
        switch_core_session_message_t msg = { 0 };
        uint8_t rl = 0, isbr = 0;
@@ -7406,8 +7406,14 @@ SWITCH_STANDARD_APP(conference_function)
                if ((p = strchr(flags_str, '}'))) {
                        *p = '\0';
                }
-       } else {
-               flags_str = switch_channel_get_variable(channel, "conference_member_flags");
+       }
+       
+       if ((v_flags_str = switch_channel_get_variable(channel, "conference_member_flags"))) {
+               if (zstr(flags_str)) {
+                       flags_str = v_flags_str;
+               } else {
+                       flags_str = switch_core_session_sprintf(session, "%s|%s", flags_str, v_flags_str);
+               }
        }
 
        /* is this a bridging conference ? */