You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2010/10/22 04:51:50 UTC

svn commit: r1026197 - /trafficserver/traffic/trunk/proxy/ControlMatcher.cc

Author: amc
Date: Fri Oct 22 02:51:49 2010
New Revision: 1026197

URL: http://svn.apache.org/viewvc?rev=1026197&view=rev
Log:
TS-493

Modified:
    trafficserver/traffic/trunk/proxy/ControlMatcher.cc

Modified: trafficserver/traffic/trunk/proxy/ControlMatcher.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ControlMatcher.cc?rev=1026197&r1=1026196&r2=1026197&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ControlMatcher.cc (original)
+++ trafficserver/traffic/trunk/proxy/ControlMatcher.cc Fri Oct 22 02:51:49 2010
@@ -369,13 +369,13 @@ template<class Data, class Result> void 
   for (int i = 0; i < num_el; i++) {
 
     r = pcre_exec(re_array[i], NULL, url_str, strlen(url_str), 0, 0, NULL, 0);
-    if (r != -1) {
+    if (r > -1) {
       Debug("matcher", "%s Matched %s with regex at line %d", matcher_name, url_str, data_array[i].line_num);
       data_array[i].UpdateMatch(result, rdata);
-    } else {
+    } else if (r < -1) {
       // An error has occured
-      Warning("error matching regex at line %d", data_array[i].line_num);
-    }
+      Warning("Error [%d] matching regex at line %d.", r, data_array[i].line_num);
+    } // else it's -1 which means no match was found.
 
   }
   xfree(url_str);