From: Volker Lendecke Date: Tue, 19 Apr 2016 14:14:30 +0000 (+0200) Subject: ctdbd_conn: Use sys_poll_intr X-Git-Tag: talloc-2.1.7~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14beae7cc9059a1efcc93887b53563b336d26d14;p=thirdparty%2Fsamba.git ctdbd_conn: Use sys_poll_intr This pulls in far less dependencies than poll_intr_one_fd and is not much more complex to call Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 127c3adda05..bb8ab0a6678 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -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; }