v3-5-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>
Sat, 5 Mar 2011 13:34:45 +0000 (14:34 +0100)
(cherry picked from commit 0b13028cb4d6fc2ff267df477b5c2c4291286a43)

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

index bcedbd6d2d4ce444f6d684513ac3b2cdd7083d2d..9f025e2c599397b99f6a8b1a3c38927d9ee15cc8 100644 (file)
@@ -1238,6 +1238,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 fad6c7aa42f4531bacff66d2bf8bba42daf06e98..ee45da0900478a88a98389495472f2c4a88a47de 100644 (file)
@@ -3070,3 +3070,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;
+}