|
|
|
@ -73,7 +73,7 @@ static int append_rra_config(char *buffer, int size, int *pos)
|
|
|
|
|
return config_get_strings("global", "rra", append_rra_config_cb, &data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int do_rrd(int mode, char *cmd) |
|
|
|
|
static int do_rrd(int mode, const char *cmd) |
|
|
|
|
{ |
|
|
|
|
int argc; |
|
|
|
|
char *argv[ARGCMAX]; |
|
|
|
@ -103,11 +103,12 @@ static int do_rrd(int mode, char *cmd)
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int rrd_create_file(char *filename, char *plugin_name, int ds_id) |
|
|
|
|
static int rrd_create_file(const char *filename, const char *plugin_name, int ds_id) |
|
|
|
|
{ |
|
|
|
|
struct sammler_plugin *plugin; |
|
|
|
|
int pos, step, retval; |
|
|
|
|
char *ds_def, *buffer; |
|
|
|
|
const char *ds_def; |
|
|
|
|
char *buffer; |
|
|
|
|
|
|
|
|
|
plugin = plugin_lookup(plugin_name); |
|
|
|
|
if (plugin == NULL) { |
|
|
|
@ -147,7 +148,7 @@ static int rrd_create_file(char *filename, char *plugin_name, int ds_id)
|
|
|
|
|
return retval; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int rrd_update_file(char *filename, char *values) |
|
|
|
|
static int rrd_update_file(const char *filename, const char *values) |
|
|
|
|
{ |
|
|
|
|
int pos, retval; |
|
|
|
|
char *buffer; |
|
|
|
@ -171,7 +172,7 @@ static int rrd_update_file(char *filename, char *values)
|
|
|
|
|
return retval; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int check_create_dir(char *dir) |
|
|
|
|
static int check_create_dir(const char *dir) |
|
|
|
|
{ |
|
|
|
|
struct stat statbuf; |
|
|
|
|
if (stat(dir, &statbuf) == -1) { |
|
|
|
@ -228,7 +229,7 @@ static int create_parent_dirs(char *filename)
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int rrd_submit(const char *hostname, char *plugin, char *filename, int ds_id, char *data) |
|
|
|
|
int rrd_submit(const char *hostname, const char *plugin, const char *filename, int ds_id, const char *data) |
|
|
|
|
{ |
|
|
|
|
struct stat statbuf; |
|
|
|
|
static const char *rrd_dir = NULL; |
|
|
|
|