fix gremlins in code that worked before then changed it's mind

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3300 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-11-10 08:13:01 +00:00
parent 964e2e9886
commit 8dc1556b95
6 changed files with 77 additions and 43 deletions

View File

@@ -287,8 +287,16 @@ static switch_status_t uuid_broadcast_function(char *cmd, switch_core_session_t
} else {
switch_media_flag_t flags = SMF_NONE;
if (argv[2] && !strcmp(argv[2], "both")) {
flags |= SMF_ECHO_BRIDGED;
if (argv[2]) {
if (!strcmp(argv[2], "both")) {
flags |= (SMF_ECHO_ALEG | SMF_ECHO_BLEG);
} else if (!strcmp(argv[2], "aleg")) {
flags |= SMF_ECHO_ALEG;
} else if (!strcmp(argv[2], "bleg")) {
flags |= SMF_ECHO_BLEG;
}
} else {
flags |= SMF_ECHO_ALEG;
}
status = switch_ivr_broadcast(argv[0], argv[1], flags);