summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ff716d)
raw | patch | inline | side by side (parent: 7ff716d)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 4 Mar 2013 16:27:31 +0000 (17:27 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 4 Mar 2013 16:27:31 +0000 (17:27 +0100) |
src/backend/collectd.c | patch | blob | history | |
src/backend/mk-livestatus.c | patch | blob | history | |
src/daemon/sysdbd.c | patch | blob | history |
diff --git a/src/backend/collectd.c b/src/backend/collectd.c
index f745fc9316d66e9849c219c4ebe2e1d3769a78a9..e0e924e2c959e946f7e645a6879aba0be5ede13c 100644 (file)
--- a/src/backend/collectd.c
+++ b/src/backend/collectd.c
sdb_collectd_config_instance(oconfig_item_t *ci)
{
char *name = NULL;
- char *socket = NULL;
+ char *socket_path = NULL;
char cb_name[1024];
oconfig_item_t *child = ci->children + i;
if (! strcasecmp(child->key, "Socket"))
- oconfig_get_string(child, &socket);
+ oconfig_get_string(child, &socket_path);
else
fprintf(stderr, "collectd backend: Ignoring unknown config "
"option '%s' inside <Instance %s>.\n",
child->key, name);
}
- if (! socket) {
+ if (! socket_path) {
fprintf(stderr, "collectd backend: Instance '%s' missing "
"the 'Socket' option.\n", name);
return -1;
snprintf(cb_name, sizeof(cb_name), "collectd-%s", name);
cb_name[sizeof(cb_name) - 1] = '\0';
- client = sdb_unixsock_client_create(socket);
+ client = sdb_unixsock_client_create(socket_path);
if (! client) {
char errbuf[1024];
fprintf(stderr, "collectd backend: Failed to create unixsock client: "
index 57fda523ddf9c81419bb6b565e0d7b305be834fe..a5126fb037e8c3e9a70412b989692b3bdb1e6c3e 100644 (file)
sdb_livestatus_config_instance(oconfig_item_t *ci)
{
char *name = NULL;
- char *socket = NULL;
+ char *socket_path = NULL;
char cb_name[1024];
oconfig_item_t *child = ci->children + i;
if (! strcasecmp(child->key, "Socket"))
- oconfig_get_string(child, &socket);
+ oconfig_get_string(child, &socket_path);
else
fprintf(stderr, "MK Livestatus backend: Ignoring unknown config "
"option '%s' inside <Instance %s>.\n",
child->key, name);
}
- if (! socket) {
+ if (! socket_path) {
fprintf(stderr, "MK Livestatus backend: Instance '%s' missing "
"the 'Socket' option.\n", name);
return -1;
snprintf(cb_name, sizeof(cb_name), "mk-livestatus-%s", name);
cb_name[sizeof(cb_name) - 1] = '\0';
- client = sdb_unixsock_client_create(socket);
+ client = sdb_unixsock_client_create(socket_path);
if (! client) {
char errbuf[1024];
fprintf(stderr, "MK Livestatus backend: Failed to create unixsock "
diff --git a/src/daemon/sysdbd.c b/src/daemon/sysdbd.c
index 8b7ebd49131262cf8e835a87ab3be9a06b80fba9..ef53a24693a909810108aa113c9c3a8a5843fa08 100644 (file)
--- a/src/daemon/sysdbd.c
+++ b/src/daemon/sysdbd.c
main(int argc, char **argv)
{
char *config_filename = NULL;
- _Bool daemon = 0;
+ _Bool do_daemonize = 0;
struct sigaction sa_intterm;
config_filename = optarg;
break;
case 'd':
- daemon = 1;
+ do_daemonize = 1;
break;
case 'h':
exit(1);
}
- if (daemon)
+ if (do_daemonize)
if (daemonize())
exit(1);