Improve check order
authorMark Spencer <markster@digium.com>
Sun, 2 Jan 2005 00:48:11 +0000 (00:48 +0000)
committerMark Spencer <markster@digium.com>
Sun, 2 Jan 2005 00:48:11 +0000 (00:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4632 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a5d7fb9..9b18e35 100755 (executable)
@@ -8421,10 +8421,10 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask
        } else if (!strcasecmp(v->name, "progressinband")) {
                ast_set_flag(mask, SIP_PROG_INBAND);
                ast_clear_flag(flags, SIP_PROG_INBAND);
-               if (ast_true(v->value))
-                       ast_set_flag(flags, SIP_PROG_INBAND_YES);
-               else if (strcasecmp(v->value, "never"))
+               if (strcasecmp(v->value, "never"))
                        ast_set_flag(flags, SIP_PROG_INBAND_NO);
+               else if (ast_true(v->value))
+                       ast_set_flag(flags, SIP_PROG_INBAND_YES);
 #ifdef OSP_SUPPORT
        } else if (!strcasecmp(v->name, "ospauth")) {
                ast_set_flag(mask, SIP_OSPAUTH);