From a39c9563158cb15835f8a40fb9e79609440b5443 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 6 Jun 2013 11:42:15 +0200 Subject: tevent: Add tevent_received to tevent_req_simple_recv_ntstatus Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- lib/util/tevent_ntstatus.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/util') diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c index cbbc698bb1..7659f15aff 100644 --- a/lib/util/tevent_ntstatus.c +++ b/lib/util/tevent_ntstatus.c @@ -76,12 +76,15 @@ bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status) NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req) { - NTSTATUS status; + NTSTATUS status = NT_STATUS_OK; - if (tevent_req_is_nterror(req, &status)) { - return status; - } - return NT_STATUS_OK; + /* + * Ignore result of tevent_req_is_nterror, we're only interested in + * the status + */ + tevent_req_is_nterror(req, &status); + tevent_req_received(req); + return status; } void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq, -- cgit