projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git]
/
src
/
curl_xml.c
diff --git
a/src/curl_xml.c
b/src/curl_xml.c
index
f3aa2d9
..
c8a1313
100644
(file)
--- a/
src/curl_xml.c
+++ b/
src/curl_xml.c
@@
-23,7
+23,6
@@
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include "utils_curl_stats.h"
#include "utils_llist.h"
#include "utils_curl_stats.h"
#include "utils_llist.h"
@@
-1017,7
+1016,6
@@
static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */
/* If all went well, register this database for reading */
if (status == 0)
{
/* If all went well, register this database for reading */
if (status == 0)
{
- user_data_t ud = { 0 };
char *cb_name;
if (db->instance == NULL)
char *cb_name;
if (db->instance == NULL)
@@
-1026,10
+1024,13
@@
static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */
DEBUG ("curl_xml plugin: Registering new read callback: %s",
db->instance);
DEBUG ("curl_xml plugin: Registering new read callback: %s",
db->instance);
- ud.data = (void *) db;
- ud.free_func = cx_free;
-
cb_name = ssnprintf_alloc ("curl_xml-%s-%s", db->instance, db->url);
cb_name = ssnprintf_alloc ("curl_xml-%s-%s", db->instance, db->url);
+
+ user_data_t ud = {
+ .data = db,
+ .free_func = cx_free
+ };
+
plugin_register_complex_read (/* group = */ "curl_xml", cb_name, cx_read,
/* interval = */ 0, &ud);
sfree (cb_name);
plugin_register_complex_read (/* group = */ "curl_xml", cb_name, cx_read,
/* interval = */ 0, &ud);
sfree (cb_name);