summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40b0765)
raw | patch | inline | side by side (parent: 40b0765)
author | Florian Forster <octo@collectd.org> | |
Fri, 3 Jul 2015 08:44:35 +0000 (10:44 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 6 Jul 2015 12:07:11 +0000 (14:07 +0200) |
src/mqtt.c | patch | blob | history |
diff --git a/src/mqtt.c b/src/mqtt.c
index 98b1751db7fafcc9b537aeca7ac2efa95df21465..acc514c52ec0ae85110e72fa1465bedc3ea42ec2 100644 (file)
--- a/src/mqtt.c
+++ b/src/mqtt.c
static int mqtt_config_publisher (oconfig_item_t *ci)
{
mqtt_client_conf_t *conf;
+ char cb_name[1024];
user_data_t user_data;
int status;
int i;
ERROR ("mqtt plugin: Unknown config option: %s", child->key);
}
+ ssnprintf (cb_name, sizeof (cb_name), "mqtt/%s", conf->name);
memset (&user_data, 0, sizeof (user_data));
user_data.data = conf;
- plugin_register_write ("mqtt", mqtt_write, &user_data);
+ plugin_register_write (cb_name, mqtt_write, &user_data);
return (0);
} /* mqtt_config_publisher */