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.");