]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
"confbridge show profile bridge" does not output "sfu" when video_mode is sfu
authorChris-Savinovich <csavinovich@digium.com>
Wed, 18 Apr 2018 16:41:50 +0000 (12:41 -0400)
committerChris Savinovich <csavinovich@digium.com>
Wed, 18 Apr 2018 22:10:08 +0000 (16:10 -0600)
Fixes a bug on the "confbridge show profile bridge" cli command
that showed "video_mode=no video" when video_mode was set
to "sfu"

ASTERISK-27418  #close

Change-Id: I481e3172c7f872664c7ac7809879d541c9f031e9

apps/confbridge/conf_config_parser.c

index f9d74831c02062d24ead97d32f28e9c6385aa149..0718d2fa5eb66e3227fd5a8cfcbb6dd1b8f6bf38 100644 (file)
@@ -1652,8 +1652,10 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
        ast_cli(a->fd,"Registration context: %s\n", b_profile.regcontext);
 
        switch (b_profile.flags
-               & (BRIDGE_OPT_VIDEO_SRC_LAST_MARKED | BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
-                       | BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER)) {
+               & (BRIDGE_OPT_VIDEO_SRC_LAST_MARKED |
+                       BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED |
+                       BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER |
+                       BRIDGE_OPT_VIDEO_SRC_SFU)) {
        case BRIDGE_OPT_VIDEO_SRC_LAST_MARKED:
                ast_cli(a->fd, "Video Mode:           last_marked\n");
                break;
@@ -1663,6 +1665,9 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
        case BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER:
                ast_cli(a->fd, "Video Mode:           follow_talker\n");
                break;
+       case BRIDGE_OPT_VIDEO_SRC_SFU:
+               ast_cli(a->fd, "Video Mode:           sfu\n");
+               break;
        case 0:
                ast_cli(a->fd, "Video Mode:           no video\n");
                break;
@@ -1992,12 +1997,6 @@ static int video_mode_handler(const struct aco_option *opt, struct ast_variable
                                | BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
                                | BRIDGE_OPT_VIDEO_SRC_SFU,
                        BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER);
-       } else if (!strcasecmp(var->value, "none")) {
-               ast_clear_flag(b_profile,
-                       BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
-                               | BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
-                               | BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
-                               | BRIDGE_OPT_VIDEO_SRC_SFU);
        } else if (!strcasecmp(var->value, "sfu")) {
                ast_set_flags_to(b_profile,
                        BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
@@ -2005,6 +2004,12 @@ static int video_mode_handler(const struct aco_option *opt, struct ast_variable
                                | BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
                                | BRIDGE_OPT_VIDEO_SRC_SFU,
                        BRIDGE_OPT_VIDEO_SRC_SFU);
+       } else if (!strcasecmp(var->value, "none")) {
+               ast_clear_flag(b_profile,
+                       BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
+                               | BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
+                               | BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
+                               | BRIDGE_OPT_VIDEO_SRC_SFU);
        } else {
                return -1;
        }