[syslog-ng] [PATCH] afsocket: Fix unix-dgram initialisation
Gergely Nagy
algernon at balabit.hu
Fri Apr 20 18:06:31 CEST 2012
When initializing an unix-dgram socket, set self->fd to the acquired
socket FD, so that fds inherited from systemd actually get used and
polled on.
Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
modules/afsocket/afsocket.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/afsocket/afsocket.c b/modules/afsocket/afsocket.c
index 5b192f4..c1bee5c 100644
--- a/modules/afsocket/afsocket.c
+++ b/modules/afsocket/afsocket.c
@@ -679,7 +679,7 @@ afsocket_sd_init(LogPipe *s)
if (sock == -1 && !afsocket_open_socket(self->bind_addr, !!(self->flags & AFSOCKET_STREAM), &sock))
return self->super.super.optional;
}
- self->fd = -1;
+ self->fd = sock;
if (!self->setup_socket(self, sock))
{
--
1.7.9.1
More information about the syslog-ng
mailing list