]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdbd_conn: Use sys_poll_intr
authorVolker Lendecke <vl@samba.org>
Tue, 19 Apr 2016 14:14:30 +0000 (16:14 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 25 Apr 2016 16:29:20 +0000 (18:29 +0200)
This pulls in far less dependencies than poll_intr_one_fd and is not much more
complex to call

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/ctdbd_conn.c

index 127c3adda05152b66f05b27a717418cce4ddc231..bb8ab0a66781a8c20391342541d3e04a3817eb40 100644 (file)
@@ -25,6 +25,7 @@
 #include "system/select.h"
 #include "lib/util/sys_rw_data.h"
 #include "lib/util/iov_buf.h"
+#include "lib/util/select.h"
 
 #include "messages.h"
 
@@ -296,12 +297,14 @@ static int ctdb_read_packet(int fd, int timeout, TALLOC_CTX *mem_ctx,
                            struct ctdb_req_header **result)
 {
        struct ctdb_req_header *req;
-       int ret, revents;
        uint32_t msglen;
        ssize_t nread;
 
        if (timeout != -1) {
-               ret = poll_intr_one_fd(fd, POLLIN, timeout, &revents);
+               struct pollfd pfd = { .fd = fd, .events = POLLIN };
+               int ret;
+
+               ret = sys_poll_intr(&pfd, 1, timeout);
                if (ret == -1) {
                        return errno;
                }