From 75e0d9d885cfcb61aa8c87c72686baf75cfde4d8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 26 Jun 2013 16:04:28 -0500 Subject: [PATCH] fix empty +flags{} pre-empting conference_member_flags variable --- src/mod/applications/mod_conference/mod_conference.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 865ee5601d..1e4990b66b 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -7350,7 +7350,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; @@ -7402,8 +7402,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 ? */