projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc9019a
)
src/daemons/plugin.c: Don't modify user_data_t* in plugin_register_flush().
author
Florian Forster
<octo@collectd.org>
Wed, 28 Sep 2016 19:23:49 +0000
(21:23 +0200)
committer
Florian Forster
<octo@collectd.org>
Wed, 28 Sep 2016 19:23:49 +0000
(21:23 +0200)
Fixes: #1954
src/daemon/plugin.c
patch
|
blob
|
history
diff --git
a/src/daemon/plugin.c
b/src/daemon/plugin.c
index
c6efc3f
..
d6cf877
100644
(file)
--- a/
src/daemon/plugin.c
+++ b/
src/daemon/plugin.c
@@
-1394,15
+1394,15
@@
int plugin_register_flush (const char *name,
}
cb->timeout = ctx.flush_timeout;
}
cb->timeout = ctx.flush_timeout;
- ud->data = cb;
- ud->free_func = plugin_flush_timeout_callback_free;
-
status = plugin_register_complex_read (
/* group = */ "flush",
/* name = */ flush_name,
/* callback = */ plugin_flush_timeout_callback,
/* interval = */ ctx.flush_interval,
status = plugin_register_complex_read (
/* group = */ "flush",
/* name = */ flush_name,
/* callback = */ plugin_flush_timeout_callback,
/* interval = */ ctx.flush_interval,
- /* user data = */ ud);
+ /* user data = */ &(user_data_t) {
+ .data = cb,
+ .free_func = plugin_flush_timeout_callback_free,
+ });
sfree (flush_name);
if (status != 0)
sfree (flush_name);
if (status != 0)