postgresql plugin: Reinitialize a database after reconnecting.
[collectd.git] / src / match_regex.c
index f14d96d..9233d80 100644 (file)
@@ -1,6 +1,7 @@
 /**
  * collectd - src/match_regex.c
  * Copyright (C) 2008  Sebastian Harl
+ * Copyright (C) 2008  Florian Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -108,17 +109,17 @@ static int mr_match_regexen (mr_regex_t *re_head, /* {{{ */
                {
                        DEBUG ("regex match: Regular expression `%s' matches `%s'.",
                                        re->re_str, string);
-                       return (FC_MATCH_MATCHES);
                }
                else
                {
                        DEBUG ("regex match: Regular expression `%s' does not match `%s'.",
                                        re->re_str, string);
+                       return (FC_MATCH_NO_MATCH);
                }
 
        }
 
-       return (FC_MATCH_NO_MATCH);
+       return (FC_MATCH_MATCHES);
 } /* }}} int mr_match_regexen */
 
 static int mr_config_add_regex (mr_regex_t **re_head, /* {{{ */