[OpenSIPS-Devel] [ opensips-Patches-2044475 ] Matching operators fail to match on some platforms

SourceForge.net noreply at sourceforge.net
Sun Aug 10 10:51:07 CEST 2008


Patches item #2044475, was opened at 2008-08-10 03:47
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2044475&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.4.x
Status: Open
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Amy Linari (amylinari)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Matching operators fail to match on some platforms

Initial Comment:
Due to a bug in route.c, the regular expression matching operators do not
work in all environments. For example, when building 1.4.0 or 1.3.2 on
Solaris 10 (sun4v or x86) they give the same result independent of input.
It would seem that if it were not for the accident of a particular struct
alignment, these operators would be broken on all platforms.

The underlying problem is a bad test in comp_s2s, which expects s2 to be a
str*, and tests st->s==NULL. When handling the matching operators MATCH_OP
and NOTMATCH_OP, it is a regex_t* instead - a fact reflected in the cast
under the appropriate switch case.

The attached patch moves these special case tests into a new function
comp_s2r which handles MATCH_OP and NOTMATCH_OP comparisons with the
correct types and tests. The corresponding patch for kamailio 1.3.2 has been filed and tested. This version of the patch has NOT been tested, but should work properly.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2044475&group_id=232389



More information about the Devel mailing list