diff --git a/src/dbi.c b/src/dbi.c
index b93aa51e39f440cd8cbd3fb1f4646948b67563ba..19d4b0a6c089c3d9b0ad48445ff27a16718acb07 100644 (file)
--- a/src/dbi.c
+++ b/src/dbi.c
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include "utils_db_query.h"
#include <dbi/dbi.h>
}
else
{
- user_data_t ud = { 0 };
char *name = NULL;
databases = temp;
databases[databases_num] = db;
databases_num++;
- ud.data = (void *) db;
- ud.free_func = NULL;
name = ssnprintf_alloc("dbi:%s", db->name);
+ user_data_t ud = {
+ .data = db
+ };
+
plugin_register_complex_read (/* group = */ NULL,
/* name = */ name ? name : db->name,
/* callback = */ cdbi_read_database,
if (queries_num == 0)
{
ERROR ("dbi plugin: No <Query> blocks have been found. Without them, "
- "this plugin can't do anything useful, so we will returns an error.");
+ "this plugin can't do anything useful, so we will return an error.");
return (-1);
}
if (databases_num == 0)
{
ERROR ("dbi plugin: No <Database> blocks have been found. Without them, "
- "this plugin can't do anything useful, so we will returns an error.");
+ "this plugin can't do anything useful, so we will return an error.");
return (-1);
}