]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Wed, 4 Apr 2007 16:51:41 +0000 (16:51 +0000)
committerAutomerge Script <automerge@asterisk.org>
Wed, 4 Apr 2007 16:51:41 +0000 (16:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60117 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f87d9f979459bb87271f46c91453bf78a26a3f92..87fce1a84750f7fbe03b2ec9f73bb3c1af6d8846 100644 (file)
@@ -12096,20 +12096,17 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
 /*! \brief  handle_common_options: Handle flag-type options common to users and peers ---*/
 static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v)
 {
-       int res = 0;
+       int res = 1;
 
        if (!strcasecmp(v->name, "trustrpid")) {
                ast_set_flag(mask, SIP_TRUSTRPID);
                ast_set2_flag(flags, ast_true(v->value), SIP_TRUSTRPID);
-               res = 1;
        } else if (!strcasecmp(v->name, "sendrpid")) {
                ast_set_flag(mask, SIP_SENDRPID);
                ast_set2_flag(flags, ast_true(v->value), SIP_SENDRPID);
-               res = 1;
        } else if (!strcasecmp(v->name, "useclientcode")) {
                ast_set_flag(mask, SIP_USECLIENTCODE);
                ast_set2_flag(flags, ast_true(v->value), SIP_USECLIENTCODE);
-               res = 1;
        } else if (!strcasecmp(v->name, "dtmfmode")) {
                ast_set_flag(mask, SIP_DTMF);
                ast_clear_flag(flags, SIP_DTMF);
@@ -12196,8 +12193,8 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask
        } else if (!strcasecmp(v->name, "promiscredir")) {
                ast_set_flag(mask, SIP_PROMISCREDIR);
                ast_set2_flag(flags, ast_true(v->value), SIP_PROMISCREDIR);
-               res = 1;
-       }
+       } else
+               res = 0;
 
        return res;
 }