From commits-return-8139-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Tue Jan 28 22:09:16 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id F063F180658 for ; Tue, 28 Jan 2020 23:09:15 +0100 (CET) Received: (qmail 6717 invoked by uid 500); 28 Jan 2020 22:09:15 -0000 Mailing-List: contact commits-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list commits@zookeeper.apache.org Received: (qmail 6700 invoked by uid 99); 28 Jan 2020 22:09:15 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2020 22:09:15 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id B85A88D845; Tue, 28 Jan 2020 22:09:14 +0000 (UTC) Date: Tue, 28 Jan 2020 22:09:14 +0000 To: "commits@zookeeper.apache.org" Subject: [zookeeper] branch branch-3.5 updated: ZOOKEEPER-1105: wait for server response in C client zookeeper_close - ADDENDUM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <158024935459.3331.3304500926421216586@gitbox.apache.org> From: nkalmar@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: zookeeper X-Git-Refname: refs/heads/branch-3.5 X-Git-Reftype: branch X-Git-Oldrev: 49cf7ec1a7238d677eb92fcdb6c022684a043a25 X-Git-Newrev: 33f98a215abeb52825fc76ddaf8d867c200ae4a4 X-Git-Rev: 33f98a215abeb52825fc76ddaf8d867c200ae4a4 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. nkalmar pushed a commit to branch branch-3.5 in repository https://gitbox.apache.org/repos/asf/zookeeper.git The following commit(s) were added to refs/heads/branch-3.5 by this push: new 33f98a2 ZOOKEEPER-1105: wait for server response in C client zookeeper_close - ADDENDUM 33f98a2 is described below commit 33f98a215abeb52825fc76ddaf8d867c200ae4a4 Author: Mate Szalay-Beko AuthorDate: Tue Jan 28 23:09:02 2020 +0100 ZOOKEEPER-1105: wait for server response in C client zookeeper_close - ADDENDUM On the branch-3.5 the socket is represented a bit differently (as the SSL support in ZOOKEEPER-2122 was not backported to branch-3.5 yet) so we had to fix the code to be compatible with the old branch. I compiled the code and tested the C client with a real 3.5.5 server. When I used the patched client, the warnings disappeared. Author: Mate Szalay-Beko Reviewers: Norbert Kalmar Closes #1236 from symat/ZOOKEEPER-1105-branch-3.5 --- zookeeper-client/zookeeper-client-c/src/zookeeper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c b/zookeeper-client/zookeeper-client-c/src/zookeeper.c index ec26641..04cfae2 100644 --- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c +++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c @@ -3269,13 +3269,13 @@ int wait_for_session_to_be_closed(zhandle_t *zh, int timeout_ms) } #ifndef WIN32 - fd_s[0].fd = zh->fd->sock; + fd_s[0].fd = zh->fd; fd_s[0].events = POLLIN; ret = poll(fd_s, 1, timeout_ms); #else FD_ZERO(&rfds); FD_SET(zh->fd->sock , &rfds); - ret = select(zh->fd->sock + 1, &rfds, NULL, NULL, &waittime); + ret = select((int)(zh->fd)+1, &rfds, NULL, NULL, &waittime); #endif if (ret == 0){