[Asterisk-code-review] chan sip: Support parsing of Q.850 reason header in SIP BYE ... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon Nov 30 06:06:49 CST 2015


Joshua Colp has posted comments on this change.

Change subject: chan_sip: Support parsing of Q.850 reason header in SIP BYE and CANCEL requests.
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/1620/3/channels/chan_sip.c
File channels/chan_sip.c:

Line 16135: 	if (ast_test_flag(&pvt->flags[1], SIP_PAGE2_Q850_REASON) &&
          : 		(rh = sip_get_header(req, "Reason"))) {
Unlike where this code used to live you can easily reduce indentation here. If the flag is not set or there is no Reason header just return -1.


Line 16138: 		if (!strncasecmp(rh, "Q.850", 5)) {
If the first 5 characters don't match Q.850 then return -1. It helps to make this easier to read and follow.


-- 
To view, visit https://gerrit.asterisk.org/1620
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifeed95a9c7c7fa86a67d0c512f3e75f28f86e66c
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Christof Lauber <christof.lauber at annax.ch>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list