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)
committerVolker Lendecke <vl@samba.org>
Wed, 22 Dec 2010 16:04:13 +0000 (09:04 -0700)
source3/include/proto.h
source3/lib/util.c

index 9febc0940cf1c421459ac1b52f36928c79fca166..034fe03c98a81656563f58039ef168243fbd5e7d 100644 (file)
@@ -1235,6 +1235,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 4bd124743800cf7b0ed39a44ae9f44231bbf7999..9efc4cca6a611e54a4a63962eda6e14be1c2d04c 100644 (file)
@@ -3202,3 +3202,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;
+}