aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2013-11-24 10:38:26 +0200
committerSergey Poznyakoff <gray@gnu.org>2013-11-24 10:38:26 +0200
commit81c6e94f238233975c9e30149cfbebbff929e8cd (patch)
tree0cac3130589b17b926a641b2947740589cbebe89
parentb2d85780ede5d64c92c77fd6e3f2fdc85084fc59 (diff)
downloadjumper-81c6e94f238233975c9e30149cfbebbff929e8cd.tar.gz
jumper-81c6e94f238233975c9e30149cfbebbff929e8cd.tar.bz2
Minor changes
* src/cons_ip.c (ip_handler): Fix debug diagnostics. * src/progman.c (open_redirector): Preserve fd 2 if log_to_stderr is set.
-rw-r--r--src/cons_ip.c8
-rw-r--r--src/progman.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cons_ip.c b/src/cons_ip.c
index b5db492..8a1b404 100644
--- a/src/cons_ip.c
+++ b/src/cons_ip.c
@@ -33,8 +33,8 @@ ip_handler(struct ip *ip, unsigned int length)
if (debug_level > 2) {
if (lp)
diag(LOG_DEBUG, "%s (%#8x) => %s (%#8x): %s:%d-%s:%d",
- inet_ntoa(ip->ip_src), ip->ip_src.s_addr,
- inet_ntoa(ip->ip_dst), ip->ip_dst.s_addr,
+ ipbuf[0], ip->ip_src.s_addr,
+ ipbuf[1], ip->ip_dst.s_addr,
lp->locus.beg.file, lp->locus.beg.line,
lp->locus.end.file, lp->locus.end.line);
else
@@ -60,8 +60,8 @@ ip_handler(struct ip *ip, unsigned int length)
if (debug_level && debug_level <= 2) {
diag(LOG_DEBUG, "%s (%#8x) => %s (%#8x): %s:%d-%s:%d: starting %s",
- inet_ntoa(ip->ip_src), ip->ip_src.s_addr,
- inet_ntoa(ip->ip_dst), ip->ip_dst.s_addr,
+ ipbuf[0], ip->ip_src.s_addr,
+ ipbuf[1], ip->ip_dst.s_addr,
lp->locus.beg.file, lp->locus.beg.line,
lp->locus.end.file, lp->locus.end.line,
lp->prog);
diff --git a/src/progman.c b/src/progman.c
index bf87e55..4ccd583 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -338,7 +338,7 @@ open_redirector(const char *tag, int prio, pid_t *return_pid)
/* Redirector process */
FD_ZERO(&fdset);
FD_SET(p[0], &fdset);
- if (facility <= 0)
+ if (log_to_stderr >= 0 || facility <= 0)
FD_SET(2, &fdset);
close_fds(&fdset);
signal_setup(redir_exit);

Return to:

Send suggestions and report system problems to the System administrator.