Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 284)
+++ trunk/configure.ac	(revision 285)
@@ -1496,4 +1496,9 @@
 			  ]
 	   )
+	   AC_CHECK_LIB(pcre, pcre_dfa_exec, [
+	   		      AC_DEFINE([HAVE_PCRE_DFA_EXEC], 1, [Define if you have pcre_dfa_exec])
+			      ], [
+			      AC_MSG_WARN([pcre_dfa_exec not available])
+			      ])
         fi
         ]
Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 284)
+++ trunk/docs/Changelog	(revision 285)
@@ -1,2 +1,8 @@
+2.7.1:
+	* check for pcre_dfa_exec (not available in old versions
+	  of libpcre, reported by Shinoj)
+	* patch to allow server to log client reports to prelude
+	  (by J. Ventura)
+
 2.7.0a (09-05-2010):
 	* fix /dev/kmem detection (reported by S. Clormann)
Index: trunk/src/sh_log_correlate.c
===================================================================
--- trunk/src/sh_log_correlate.c	(revision 284)
+++ trunk/src/sh_log_correlate.c	(revision 285)
@@ -271,6 +271,10 @@
 	       * array, otherwise number of matches is not returned.
 	       */
+#if defined(HAVE_PCRE_DFA_EXEC)
 	      int ovector[SH_MINIBUF];
 	      int wspace[SH_MINIBUF];
+#endif
+
+#if defined(HAVE_PCRE_DFA_EXEC)
 	      int val = pcre_dfa_exec(mkeep->rule, NULL, 
 				      sh_string_str(res), 
@@ -280,4 +284,14 @@
 				      ovector, SH_MINIBUF,
 				      wspace, SH_MINIBUF);
+#else
+	      int val = pcre_exec(mkeep->rule, NULL, 
+				  sh_string_str(res), 
+				  (int)sh_string_len(res), 
+				  0, /* start at offset 0 in the subject */
+				  0, 
+				  NULL, 0);
+	      val = (val >= 0) ? 1 : val;			      
+#endif
+
 	      if (val >= 0)
 		{
Index: trunk/src/sh_log_evalrule.c
===================================================================
--- trunk/src/sh_log_evalrule.c	(revision 284)
+++ trunk/src/sh_log_evalrule.c	(revision 285)
@@ -1034,4 +1034,5 @@
     mmm = replace_captures(record->message, rule->ovector, 
 			   rule->ovecnum);
+    rule->ovecnum = 0;
     msg = sh_util_safe_name_keepspace (sh_string_str(mmm));
   }
@@ -1133,5 +1134,6 @@
  */
 static int  process_counter(struct sh_ceval * counter, 
-			    struct sh_geval * rule,  struct sh_logrecord * record)
+			    struct sh_geval * rule,  
+			    struct sh_logrecord * record)
 {
   int retval = -1;
@@ -1142,4 +1144,5 @@
       counter->counted_str = replace_captures(record->message, rule->ovector, 
 					      rule->ovecnum);
+      rule->ovecnum        = 0;
       counter->filename    = sh_string_new_from_lchar(record->filename,
 						      strlen(record->filename));
