v3-4-test: Pull in tevent_req_poll_ntstatus from master
authorVolker Lendecke <vl@samba.org>
Wed, 22 Dec 2010 14:21:27 +0000 (15:21 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 13 Jan 2011 16:58:53 +0000 (17:58 +0100)
(cherry picked from commit 9b79de1553cfa57d24d1ac0316b814933ef3d33d)

source3/include/proto.h
source3/lib/util.c

index a6ac5122d1fea14fd98d137987957218401f88ac..35ac19b38b79ffef329c0c9b10009b7fcb8344cb 100644 (file)
@@ -1221,6 +1221,9 @@ bool is_valid_policy_hnd(const struct policy_handle *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
                      const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+                             struct tevent_context *ev,
+                             NTSTATUS *status);
 
 /* The following definitions come from lib/util_file.c  */
 
index 3d7336f957bc62f3029781626710b53117861219..c9afe7b6a9156e647ff8645b45f17d63c26ddc4b 100644 (file)
@@ -3188,3 +3188,14 @@ const char *strip_hostname(const char *s)
 
        return s;
 }
+
+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;
+}