From: Volker Lendecke Date: Sun, 1 Mar 2009 21:25:51 +0000 (+0100) Subject: Add tevent_req_simple_recv_ntstatus() X-Git-Tag: tdb-1.1.5~1075^2~17 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=6a2e71b12dbfed195859f0fc521ec5a5c145e1f5 Add tevent_req_simple_recv_ntstatus() --- diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c index 1a34e9c749d..4e4339989a1 100644 --- a/lib/util/tevent_ntstatus.c +++ b/lib/util/tevent_ntstatus.c @@ -49,3 +49,13 @@ bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status) } return true; } + +NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req) +{ + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + return status; + } + return NT_STATUS_OK; +} diff --git a/lib/util/tevent_ntstatus.h b/lib/util/tevent_ntstatus.h index 84c275fb130..d7194a9b730 100644 --- a/lib/util/tevent_ntstatus.h +++ b/lib/util/tevent_ntstatus.h @@ -28,5 +28,6 @@ bool tevent_req_nterror(struct tevent_req *req, NTSTATUS status); bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *pstatus); +NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req); #endif