]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log: set the UDP receiver's I/O handler in the receiver
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:25:32 +0000 (21:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
The I/O handler is syslog_fd_handler(), let's set it when creating
the receivers.

src/log.c

index 676d504e551000cdd49c71402c75f871d17ff9a5..ffd826332900282690d7e2b3434b7252af9f1cef 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -3893,6 +3893,7 @@ int cfg_parse_log_forward(const char *file, int linenum, char **args, int kwm)
                list_for_each_entry(l, &bind_conf->listeners, by_bind) {
                        /* the fact that the sockets are of type dgram is guaranteed by str2receiver() */
                        l->maxaccept = global.tune.maxaccept ? global.tune.maxaccept : 64;
+                       l->rx.iocb   = syslog_fd_handler;
                        global.maxsock++;
                }
                cur_arg++;