1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

lib: Add tevent_req_simple_recv_unix

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-11-08 09:00:31 +00:00 committed by Jeremy Allison
parent 5f68f7289c
commit f5c17d41e0
2 changed files with 14 additions and 0 deletions

View File

@ -48,3 +48,16 @@ bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno)
} }
return true; return true;
} }
int tevent_req_simple_recv_unix(struct tevent_req *req)
{
int err = 0;
/*
* Ignore result of tevent_req_is_unix_error, we're only interested in
* the status
*/
tevent_req_is_unix_error(req, &err);
tevent_req_received(req);
return err;
}

View File

@ -27,5 +27,6 @@
#include <tevent.h> #include <tevent.h>
bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno); bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno);
int tevent_req_simple_recv_unix(struct tevent_req *req);
#endif #endif