lib/util: move tevent_req_poll_ntstatus() to tevent_ntstatus.c
authorStefan Metzmacher <metze@samba.org>
Mon, 14 May 2012 08:02:24 +0000 (10:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 14 May 2012 13:12:34 +0000 (15:12 +0200)
metze

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

index 764d251b591bf7dba84f65bf60de9fb7af614a7c..cbbc698bb1eed41f5f1999a507a4a68af92c9f5d 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "../replace/replace.h"
 #include "tevent_ntstatus.h"
+#include "libcli/util/error.h"
 
 #define TEVENT_NTERROR_MAGIC (0x917b5acd)
 
@@ -97,3 +98,14 @@ void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
        }
        tevent_req_done(req);
 }
+
+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_common(errno);
+       }
+       return ret;
+}
index 4ac9243320d534b935e7445082e767a00fa581f0..570b6f951aedcb9d9575cc9ad0f397fe0ccea341 100644 (file)
@@ -40,4 +40,8 @@ NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);
 void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
                                       NTSTATUS subreq_status);
 
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+                             struct tevent_context *ev,
+                             NTSTATUS *status);
+
 #endif
index d45ec888f6987e207cb161d048d34a5998a01748..f9306b88419df09203484e08c2f4ab5ceccec33a 100644 (file)
@@ -536,9 +536,6 @@ void split_domain_user(TALLOC_CTX *mem_ctx,
                       char **domain,
                       char **user);
 const char *strip_hostname(const char *s);
-bool tevent_req_poll_ntstatus(struct tevent_req *req,
-                             struct tevent_context *ev,
-                             NTSTATUS *status);
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result);
 int timeval_to_msec(struct timeval t);
 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
index 22c2eb288cc4d67126d439aef41ed3cb1629589e..49cd7719e365fe13ad14a65fc67443dac032d14d 100644 (file)
@@ -2262,17 +2262,6 @@ 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_common(errno);
-       }
-       return ret;
-}
-
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result)
 {
        if (!NT_STATUS_IS_OK(err1)) {