projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb9f56e
)
src/plugin.c: Fix plugin_dispatch_notification again.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 23 Feb 2009 14:36:40 +0000
(15:36 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 23 Feb 2009 14:36:40 +0000
(15:36 +0100)
src/plugin.c
patch
|
blob
|
history
diff --git
a/src/plugin.c
b/src/plugin.c
index
4e35bf2
..
856ec1a
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-1138,7
+1138,6
@@
int plugin_dispatch_values (value_list_t *vl)
int plugin_dispatch_notification (const notification_t *notif)
{
int plugin_dispatch_notification (const notification_t *notif)
{
- int (*callback) (const notification_t *);
llentry_t *le;
/* Possible TODO: Add flap detection here */
llentry_t *le;
/* Possible TODO: Add flap detection here */
@@
-1154,8
+1153,19
@@
int plugin_dispatch_notification (const notification_t *notif)
le = llist_head (list_notification);
while (le != NULL)
{
le = llist_head (list_notification);
while (le != NULL)
{
- callback = (int (*) (const notification_t *)) le->value;
- (*callback) (notif);
+ callback_func_t *cf;
+ plugin_notification_cb callback;
+ int status;
+
+ cf = le->value;
+ callback = cf->cf_callback;
+ status = (*callback) (notif, &cf->cf_udata);
+ if (status != 0)
+ {
+ WARNING ("plugin_dispatch_notification: Notification "
+ "callback %s returned %i.",
+ le->key, status);
+ }
le = le->next;
}
le = le->next;
}