Add tevent_req_simple_recv_ntstatus()
authorVolker Lendecke <vl@samba.org>
Sun, 1 Mar 2009 21:25:51 +0000 (22:25 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Mar 2009 12:23:40 +0000 (13:23 +0100)
lib/util/tevent_ntstatus.c
lib/util/tevent_ntstatus.h

index 1a34e9c749d4448b0af56cabe79f468ad81c002e..4e4339989a1de7242a0ac958f8ef683c59710a0b 100644 (file)
@@ -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;
+}
index 84c275fb130df11779f53d22ac4f9f745a225afb..d7194a9b730accb6434db86f8135631b7a1ad04d 100644 (file)
@@ -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