[Kamailio-Devel] [ openser-Patches-2044415 ] Matching operators fail to match on some platforms

SourceForge.net noreply at sourceforge.net
Sun Aug 10 01:10:04 CEST 2008


Patches item #2044415, was opened at 2008-08-09 19:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2044415&group_id=139143

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: ver 1.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Amy Linari (amylinari)
Assigned to: Nobody/Anonymous (nobody)
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. This should be trivial to apply to 1.4.0 though the patch was made against 1.3.2.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2044415&group_id=139143



More information about the Devel mailing list