summaryrefslogtreecommitdiff
path: root/lib/util/tevent_ntstatus.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-14 09:38:20 +0100
committerVolker Lendecke <vl@samba.org>2009-11-14 11:03:28 +0100
commitc254349261e0a59e4403c314ec8c17aa6b7dfc37 (patch)
treea5db57fbd9671276381d69d81278944893b88cbe /lib/util/tevent_ntstatus.c
parent6133ab6055f68a11380d384c1d871774139035ea (diff)
downloadsamba-c254349261e0a59e4403c314ec8c17aa6b7dfc37.tar.gz
samba-c254349261e0a59e4403c314ec8c17aa6b7dfc37.tar.bz2
samba-c254349261e0a59e4403c314ec8c17aa6b7dfc37.zip
Introduce tevent_req_simple_finish_ntstatus
Diffstat (limited to 'lib/util/tevent_ntstatus.c')
-rw-r--r--lib/util/tevent_ntstatus.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c
index d6cb0affd9..4be4575499 100644
--- a/lib/util/tevent_ntstatus.c
+++ b/lib/util/tevent_ntstatus.c
@@ -59,3 +59,18 @@ NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req)
}
return NT_STATUS_OK;
}
+
+void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
+ NTSTATUS subreq_status)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+
+ TALLOC_FREE(subreq);
+
+ if (!NT_STATUS_IS_OK(subreq_status)) {
+ tevent_req_nterror(req, subreq_status);
+ return;
+ }
+ tevent_req_done(req);
+}