summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a810982)
raw | patch | inline | side by side (parent: a810982)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 22 Nov 2008 00:04:29 +0000 (01:04 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 22 Nov 2008 00:04:29 +0000 (01:04 +0100) |
src/plugin.c | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index b00433623f9cd40c3fb66346abe794e64915714c..465e2899ace67a57f0b50d91532e2a7f224682dd 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
#include "utils_llist.h"
#include "utils_cache.h"
#include "utils_threshold.h"
+#include "filter_chain.h"
/*
* Private structures
int success = 0;
int failure = 0;
- le = llist_head (list_flush);
+ le = llist_head (list_write);
while (le != NULL)
{
callback = le->value;
}
else /* plugin != NULL */
{
- le = llist_head (list_flush);
+ le = llist_head (list_write);
while (le != NULL)
{
if (strcasecmp (plugin, le->key) == 0)
static c_complain_t no_write_complaint = C_COMPLAIN_INIT_STATIC;
data_set_t *ds;
- llentry_t *le;
-
- int filter = 0;
if ((vl == NULL) || (*vl->type == '\0')) {
ERROR ("plugin_dispatch_values: Invalid value list.");
escape_slashes (vl->type, sizeof (vl->type));
escape_slashes (vl->type_instance, sizeof (vl->type_instance));
- le = llist_head (list_filter);
- while (le != NULL)
- {
- int (*filter_callback) (const data_set_t *, value_list_t *) =
- (int (*) (const data_set_t *, value_list_t *)) le->value;
-
- filter |= (*filter_callback) (ds, vl);
-
- if (filter == FILTER_IGNORE)
- return (-1);
-
- le = le->next;
- }
-
/* Update the value cache */
uc_update (ds, vl);
- if ((filter & FILTER_NOTHRESHOLD_CHECK) == 0)
- ut_check_threshold (ds, vl);
-
- if (filter & FILTER_NOWRITE)
- return (0);
-
- le = llist_head (list_write);
- while (le != NULL)
- {
- int (*write_callback) (const data_set_t *, const value_list_t *) =
- (int (*) (const data_set_t *, const value_list_t *)) le->value;
-
- (*write_callback) (ds, vl);
-
- le = le->next;
- }
+ fc_process (ds, vl);
return (0);
} /* int plugin_dispatch_values */