]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Small code cleanup in chan_sip 05/4605/1
authorBadalyan Vyacheslav <v.badalyan@open-bs.ru>
Thu, 8 Dec 2016 18:58:19 +0000 (18:58 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 8 Dec 2016 22:54:47 +0000 (16:54 -0600)
The conditional expressions of the 'if' operators situated
alongside each other are identical.

Change-Id: I2cf7c317b106ec14440c7f1b5dcfbf03639f748a

channels/chan_sip.c

index 895739b4c0febf20058680aa6959034705d21faf..a56bb7ca1d5c6c2321ca9fad72d79bcf61c560ea 100644 (file)
@@ -10800,6 +10800,9 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
                struct ast_str *vpeer_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
                struct ast_str *tpeer_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
                struct ast_str *joint_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+               struct ast_str *s1 = ast_str_alloca(SIPBUFSIZE);
+               struct ast_str *s2 = ast_str_alloca(SIPBUFSIZE);
+               struct ast_str *s3 = ast_str_alloca(SIPBUFSIZE);
 
                ast_verbose("Capabilities: us - %s, peer - audio=%s/video=%s/text=%s, combined - %s\n",
                            ast_format_cap_get_names(p->caps, &cap_buf),
@@ -10807,11 +10810,6 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
                            ast_format_cap_get_names(vpeercapability, &vpeer_buf),
                            ast_format_cap_get_names(tpeercapability, &tpeer_buf),
                            ast_format_cap_get_names(newjointcapability, &joint_buf));
-       }
-       if (debug) {
-               struct ast_str *s1 = ast_str_alloca(SIPBUFSIZE);
-               struct ast_str *s2 = ast_str_alloca(SIPBUFSIZE);
-               struct ast_str *s3 = ast_str_alloca(SIPBUFSIZE);
 
                ast_verbose("Non-codec capabilities (dtmf): us - %s, peer - %s, combined - %s\n",
                            ast_rtp_lookup_mime_multiple2(s1, NULL, p->noncodeccapability, 0, 0),