[OpenSIPS-Devel] SF.net SVN: opensips:[4600] branches/1.4/route.c

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sun Aug 10 12:00:17 CEST 2008


Revision: 4600
          http://opensips.svn.sourceforge.net/opensips/?rev=4600&view=rev
Author:   bogdan_iancu
Date:     2008-08-10 10:00:16 +0000 (Sun, 10 Aug 2008)

Log Message:
-----------
backport from trunk (#rev 4599):
- bug fixed: Matching operators fail to match on some platforms.
- Decription:
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.

Credits go to Amy Linari (patch a bit reworked). Closes patch 2044475.

Revision Links:
--------------
    http://opensips.svn.sourceforge.net/opensips/?rev=4599&view=rev

Modified Paths:
--------------
    branches/1.4/route.c


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Devel mailing list