summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de4ccd7)
raw | patch | inline | side by side (parent: de4ccd7)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Mar 2016 14:17:10 +0000 (15:17 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Mar 2016 14:17:10 +0000 (15:17 +0100) |
src/daemon/collectd.c | patch | blob | history | |
src/daemon/configfile.c | patch | blob | history | |
src/daemon/configfile.h | patch | blob | history |
diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c
index a745d7d1ad367c93bf9d823f78298b68e0ccba93..a970d03e1c752b53dbcab2cee6c28bb7fad86a1a 100644 (file)
--- a/src/daemon/collectd.c
+++ b/src/daemon/collectd.c
struct sigaction sig_term_action;
struct sigaction sig_usr1_action;
struct sigaction sig_pipe_action;
- char *configfile = CONFIGFILE;
+ const char *configfile = CONFIGFILE;
int test_config = 0;
int test_readall = 0;
const char *basedir;
index 89b0be0b1cc780dc7e185bb232f7123b33344e31..8a7621d2b5fb912b02d64c8c9f86456d42dbea08 100644 (file)
--- a/src/daemon/configfile.c
+++ b/src/daemon/configfile.c
typedef struct cf_value_map_s
{
- char *key;
+ const char *key;
int (*func) (oconfig_item_t *);
} cf_value_map_t;
typedef struct cf_global_option_s
{
- char *key;
+ const char *key;
char *value;
- char *def;
+ const char *def;
} cf_global_option_t;
/*
static int dispatch_block_plugin (oconfig_item_t *ci)
{
int i;
- char *name;
+ const char *name;
cf_complex_callback_t *cb;
@@ -1115,7 +1115,7 @@ int cf_register_complex (const char *type, int (*callback) (oconfig_item_t *))
return (0);
} /* int cf_register_complex */
-int cf_read (char *filename)
+int cf_read (const char *filename)
{
oconfig_item_t *conf;
int i;
index 5bc9b305615ee3404d8d373dd5544de7e88e433d..648246bd2d22076178afb4f64df2bbadd97c74cc 100644 (file)
--- a/src/daemon/configfile.h
+++ b/src/daemon/configfile.h
* Returns zero upon success and non-zero otherwise. A error-message will have
* been printed in this case.
*/
-int cf_read (char *filename);
+int cf_read (const char *filename);
int global_option_set (const char *option, const char *value);
const char *global_option_get (const char *option);