summaryrefslogtreecommitdiff
path: root/lib/util/tevent_ntstatus.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-14 10:01:44 +0100
committerVolker Lendecke <vl@samba.org>2009-11-14 11:03:28 +0100
commitf38edcd61a556815db2ecfaa265a46e859e980f6 (patch)
tree75dbfb6371655d3a96046aa0c5bd25c78a5f8568 /lib/util/tevent_ntstatus.c
parentc254349261e0a59e4403c314ec8c17aa6b7dfc37 (diff)
downloadsamba-f38edcd61a556815db2ecfaa265a46e859e980f6.tar.gz
samba-f38edcd61a556815db2ecfaa265a46e859e980f6.tar.bz2
samba-f38edcd61a556815db2ecfaa265a46e859e980f6.zip
Introduce tevent_req_poll_ntstatus
Diffstat (limited to 'lib/util/tevent_ntstatus.c')
-rw-r--r--lib/util/tevent_ntstatus.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c
index 4be4575499..e6b37f64b6 100644
--- a/lib/util/tevent_ntstatus.c
+++ b/lib/util/tevent_ntstatus.c
@@ -74,3 +74,20 @@ void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
}
tevent_req_done(req);
}
+
+/*
+ * We have to declare map_nt_error_from_unix here, both s3 and s4 have their
+ * (different) implementations of it.
+ */
+NTSTATUS map_nt_error_from_unix(int sys_errno);
+
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+ struct tevent_context *ev,
+ NTSTATUS *status)
+{
+ bool ret = tevent_req_poll(req, ev);
+ if (!ret) {
+ *status = map_nt_error_from_unix(errno);
+ }
+ return ret;
+}