diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-06 18:36:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-06 18:36:50 +0000 |
commit | 3538b9a8822421b7c8596a33a917dcf2f99c92b7 (patch) | |
tree | 768c23fe79bb81583de7376a4d744632d888d303 /networking/fakeidentd.c | |
parent | 5d725462d44268f9a86030daaa6f6396d32f796c (diff) | |
download | busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.tar.gz busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.tar.bz2 busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.zip |
Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
Diffstat (limited to 'networking/fakeidentd.c')
-rw-r--r-- | networking/fakeidentd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index 29e09d13e..2d690edba 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c | |||
@@ -157,7 +157,6 @@ static int godaemon(void) | |||
157 | 157 | ||
158 | setsid(); | 158 | setsid(); |
159 | 159 | ||
160 | openlog(bb_applet_name, 0, LOG_DAEMON); | ||
161 | return 1; | 160 | return 1; |
162 | } | 161 | } |
163 | 162 | ||
@@ -219,6 +218,10 @@ static int checkInput(char *buf, int len, int l) | |||
219 | 218 | ||
220 | int fakeidentd_main(int argc, char **argv) | 219 | int fakeidentd_main(int argc, char **argv) |
221 | { | 220 | { |
221 | /* This applet is an inetd-style daemon */ | ||
222 | openlog(bb_applet_name, 0, LOG_DAEMON); | ||
223 | logmode = LOGMODE_SYSLOG; | ||
224 | |||
222 | memset(conns, 0, sizeof(conns)); | 225 | memset(conns, 0, sizeof(conns)); |
223 | memset(&G, 0, sizeof(G)); | 226 | memset(&G, 0, sizeof(G)); |
224 | FD_ZERO(&G.readfds); | 227 | FD_ZERO(&G.readfds); |
@@ -286,7 +289,7 @@ deleteconn: | |||
286 | 289 | ||
287 | if (s < 0) { | 290 | if (s < 0) { |
288 | if (errno != EINTR) /* EINTR */ | 291 | if (errno != EINTR) /* EINTR */ |
289 | syslog(LOG_ERR, "accept: %s", strerror(errno)); | 292 | bb_perror_msg("accept"); |
290 | } else { | 293 | } else { |
291 | if (G.conncnt == MAXCONNS) | 294 | if (G.conncnt == MAXCONNS) |
292 | i = closeOldest(); | 295 | i = closeOldest(); |