Clear revents before calling poll in the event loops for the sync API.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2017-06-30 13:48:16 +10:00
parent a0f187d9c9
commit de9e123099
1 changed files with 4 additions and 2 deletions

View File

@ -117,8 +117,9 @@ static void wait_for_reply(struct rpc_context *rpc, struct sync_cb_data *cb_data
while (!cb_data->is_finished) {
pfd.fd = rpc_get_fd(rpc);
pfd.events = rpc_which_events(rpc);
pfd.fd = rpc_get_fd(rpc);
pfd.events = rpc_which_events(rpc);
pfd.revents = 0;
ret = poll(&pfd, 1, 100);
if (ret < 0) {
@ -152,6 +153,7 @@ static void wait_for_nfs_reply(struct nfs_context *nfs, struct sync_cb_data *cb_
pfd.fd = nfs_get_fd(nfs);
pfd.events = nfs_which_events(nfs);
pfd.revents = 0;
ret = poll(&pfd, 1, 100);
if (ret < 0) {