You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/06/26 03:45:08 UTC

svn commit: r1139684 - in /trafficserver/plugins/geoip_acl: Makefile acl.cc

Author: zwoop
Date: Sun Jun 26 01:45:08 2011
New Revision: 1139684

URL: http://svn.apache.org/viewvc?rev=1139684&view=rev
Log:
Fix test and add pcre dependency

Modified:
    trafficserver/plugins/geoip_acl/Makefile
    trafficserver/plugins/geoip_acl/acl.cc

Modified: trafficserver/plugins/geoip_acl/Makefile
URL: http://svn.apache.org/viewvc/trafficserver/plugins/geoip_acl/Makefile?rev=1139684&r1=1139683&r2=1139684&view=diff
==============================================================================
--- trafficserver/plugins/geoip_acl/Makefile (original)
+++ trafficserver/plugins/geoip_acl/Makefile Sun Jun 26 01:45:08 2011
@@ -18,7 +18,7 @@ TSXS=tsxs
 GEO_LIB=GeoIP # Also check lulu.h for defines ...
 
 all:	geoip_acl.cc acl.cc
-	$(TSXS) -v -C $? -l $(GEO_LIB) -o geoip_acl.so
+	$(TSXS) -v -C $? -l $(GEO_LIB) -lpcre -o geoip_acl.so
 
 install:
 	tsxs -i -o geoip_acl.so

Modified: trafficserver/plugins/geoip_acl/acl.cc
URL: http://svn.apache.org/viewvc/trafficserver/plugins/geoip_acl/acl.cc?rev=1139684&r1=1139683&r2=1139684&view=diff
==============================================================================
--- trafficserver/plugins/geoip_acl/acl.cc (original)
+++ trafficserver/plugins/geoip_acl/acl.cc Sun Jun 26 01:45:08 2011
@@ -105,7 +105,7 @@ RegexAcl::compile(const std::string& str
 
   if (NULL != _rex) {
     _extra = pcre_study(_rex, 0, &error);
-    if ((_extra == NULL) && (*error != 0)) {
+    if ((NULL == _extra) && error && (*error != 0)) {
       TSError("Failed to study regular expression in %s:line %d at offset %d: %s\n", filename, lineno, erroffset, error);
       return false;
     }