Index: trunk/src/sh_log_correlate.c
===================================================================
--- trunk/src/sh_log_correlate.c	(revision 283)
+++ 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 283)
+++ 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));
