1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

lib: Add tevent_req_poll_unix

This makes sync wrappers a bit shorter

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-07-09 12:50:24 +00:00 committed by Jeremy Allison
parent 117e87d804
commit 07c9f69769
2 changed files with 12 additions and 0 deletions

View File

@ -61,3 +61,13 @@ int tevent_req_simple_recv_unix(struct tevent_req *req)
tevent_req_received(req);
return err;
}
bool tevent_req_poll_unix(struct tevent_req *req, struct tevent_context *ev,
int *err)
{
bool ret = tevent_req_poll(req, ev);
if (!ret) {
*err = errno;
}
return ret;
}

View File

@ -28,5 +28,7 @@
bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno);
int tevent_req_simple_recv_unix(struct tevent_req *req);
bool tevent_req_poll_unix(struct tevent_req *req, struct tevent_context *ev,
int *err);
#endif