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:
parent
117e87d804
commit
07c9f69769
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user