summaryrefslogtreecommitdiffstats
path: root/src/run.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-18 13:09:49 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-18 13:09:49 +0000
commit91d431dacd79d93d671ace690e2e9c7fbb0f2877 (patch)
tree40757240f65899615dfc4f6b1f8c7b2f47d4af48 /src/run.c
parent406e9ad8c741fe18b9f3722bed679c3dc4e96614 (diff)
Max Kellermann <max@duempel.org>:
Simplify logging infrastructure
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/run.c b/src/run.c
index 9076028..a5b6a79 100644
--- a/src/run.c
+++ b/src/run.c
@@ -43,7 +43,7 @@ void killer(int foo)
local_server_destroy(STATE(local), CONFIG(local).path);
STATE(mode)->kill();
unlink(CONFIG(lockfile));
- dlog(STATE(log), LOG_NOTICE, "---- shutdown received ----");
+ dlog(LOG_NOTICE, "---- shutdown received ----");
close_log();
sigprocmask(SIG_UNBLOCK, &STATE(block), NULL);
@@ -63,7 +63,7 @@ void local_handler(int fd, void *data)
ret = read(fd, &type, sizeof(type));
if (ret == -1) {
- dlog(STATE(log), LOG_ERR, "can't read from unix socket");
+ dlog(LOG_ERR, "can't read from unix socket");
return;
}
if (ret == 0)
@@ -71,7 +71,7 @@ void local_handler(int fd, void *data)
switch(type) {
case FLUSH_MASTER:
- dlog(STATE(log), LOG_WARNING, "`conntrackd -F' is deprecated. "
+ dlog(LOG_WARNING, "`conntrackd -F' is deprecated. "
"Use conntrack -F instead.");
if (fork() == 0) {
execlp("conntrack", "conntrack", "-F", NULL);
@@ -79,13 +79,13 @@ void local_handler(int fd, void *data)
}
return;
case RESYNC_MASTER:
- dlog(STATE(log), LOG_NOTICE, "resync with master table");
+ dlog(LOG_NOTICE, "resync with master table");
nl_dump_conntrack_table();
return;
}
if (!STATE(mode)->local(fd, type, data))
- dlog(STATE(log), LOG_WARNING, "unknown local request %d", type);
+ dlog(LOG_WARNING, "unknown local request %d", type);
}
int
@@ -104,25 +104,25 @@ init(void)
/* Initialization */
if (STATE(mode)->init() == -1) {
- dlog(STATE(log), LOG_ERR, "initialization failed");
+ dlog(LOG_ERR, "initialization failed");
return -1;
}
/* local UNIX socket */
STATE(local) = local_server_create(&CONFIG(local));
if (!STATE(local)) {
- dlog(STATE(log), LOG_ERR, "can't open unix socket!");
+ dlog(LOG_ERR, "can't open unix socket!");
return -1;
}
if (nl_init_event_handler() == -1) {
- dlog(STATE(log), LOG_ERR, "can't open netlink handler! "
+ dlog(LOG_ERR, "can't open netlink handler! "
"no ctnetlink kernel support?");
return -1;
}
if (nl_init_dump_handler() == -1) {
- dlog(STATE(log), LOG_ERR, "can't open netlink handler! "
+ dlog(LOG_ERR, "can't open netlink handler! "
"no ctnetlink kernel support?");
return -1;
}
@@ -146,7 +146,7 @@ init(void)
if (signal(SIGCHLD, child) == SIG_ERR)
return -1;
- dlog(STATE(log), LOG_NOTICE, "initialization completed");
+ dlog(LOG_NOTICE, "initialization completed");
return 0;
}
@@ -171,7 +171,7 @@ static int __run(struct timeval *next_alarm)
if (errno == EINTR)
return 0;
- dlog(STATE(log), LOG_WARNING,
+ dlog(LOG_WARNING,
"select failed: %s", strerror(errno));
return 0;
}
@@ -213,7 +213,7 @@ static int __run(struct timeval *next_alarm)
case EAGAIN:
break;
default:
- dlog(STATE(log), LOG_WARNING,
+ dlog(LOG_WARNING,
"event catch says: %s", strerror(errno));
break;
}