[Asterisk-code-review] Bundled pjproject: Fix finding SIP transactions. (asterisk[13])

George Joseph asteriskteam at digium.com
Wed Dec 7 06:15:59 CST 2016


Hello Anonymous Coward #1000019, Joshua Colp,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/4565

to look at the new patch set (#2).

Change subject: Bundled pjproject:  Fix finding SIP transactions.
......................................................................

Bundled pjproject:  Fix finding SIP transactions.

Occasionally SIP message transactions are not found when they should be.
In the particular case an incoming INVITE transaction is CANCELed but the
INVITE transaction cannot be found so a 481 response is returned for the
CANCEL.  The problematic calls have a '_' character in the Via branch
parameter.

The problem is in the pjproject PJ_HASH_USE_OWN_TOLOWER feature's code.
The problem with the "own tolower" code is that it does not calculate the
same hash value as when the pj_tolower() function is used.  The "own
tolower" code will erroneously modify the ASCII characters '@', '[', '\\',
']', '^', and '_'.  Calls to pj_hash_calc_tolower() can use the
PJ_HASH_USE_OWN_TOLOWER substitute algorithm when enabled.  Calls to
pj_hash_get_lower(), pj_hash_set_lower(), and pj_hash_set_np_lower() call
find_entry() which never uses the PJ_HASH_USE_OWN_TOLOWER algorithm.  As a
result you may not be able to find a hash tabled entry because the
calculated hash values would differ.

* Simply disable PJ_HASH_USE_OWN_TOLOWER.

ASTERISK-26490 #close

Change-Id: If89bfdb5f301b8b685881a9a2a6e0c3c5af32253
---
M third-party/pjproject/patches/config_site.h
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/65/4565/2
-- 
To view, visit https://gerrit.asterisk.org/4565
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If89bfdb5f301b8b685881a9a2a6e0c3c5af32253
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list