summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 851c33e)
raw | patch | inline | side by side (parent: 851c33e)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Apr 2014 17:36:38 +0000 (19:36 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Apr 2014 17:36:38 +0000 (19:36 +0200) |
That is, handle NULL arguments passed to the config and module init functions
during reconfiguration.
during reconfiguration.
src/backend/collectd/unixsock.c | patch | blob | history | |
src/backend/mk-livestatus.c | patch | blob | history | |
src/backend/puppet/store-configs.c | patch | blob | history |
index 7c60c5e79b9d14a978644a72915a3ad39202fcb6..0c5082af54c0b9ca99a95ef8fea295ffeeae1e3b 100644 (file)
{
int i;
+ if (! ci) /* nothing to do to deconfigure this plugin */
+ return 0;
+
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *child = ci->children + i;
index c77951a20246ba7a3e2d4a8a8474cac5900eded4..21c603ad497fab30db9189405ba807b874001f06 100644 (file)
{
int i;
+ if (! ci) /* nothing to do to deconfigure this plugin */
+ return 0;
+
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *child = ci->children + i;
index e109b305819cfcec5fb1d7f32403241ed519d69b..5506b0a939e984254f2c8646a7ba954a130dbc77 100644 (file)
{
int i;
+ if (! ci) /* nothing to do to deconfigure this plugin */
+ return 0;
+
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *child = ci->children + i;
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_VERSION, SDB_VERSION);
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_PLUGIN_VERSION, SDB_VERSION);
- if (dbi_initialize(/* driver dir = */ NULL) < 0) {
+ /* don't reinitialize dbi when reinitializing the plugin */
+ if (info && (dbi_initialize(/* driver dir = */ NULL) < 0)) {
sdb_log(SDB_LOG_ERR, "puppet::store-configs backend: failed to "
"initialize DBI; possibly you don't have any drivers "
"installed.");