diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-05-14 10:02:24 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-14 15:12:34 +0200 |
commit | b2c9fe4ad18fd4ecb04bc2e3c2896e06418efed0 (patch) | |
tree | 60be12e8a4afcfe3620344629bc765cafd05cfbf | |
parent | 23887fa87e403a79c8fd5f28373940bd695a293c (diff) | |
download | samba-b2c9fe4ad18fd4ecb04bc2e3c2896e06418efed0.tar.gz samba-b2c9fe4ad18fd4ecb04bc2e3c2896e06418efed0.tar.bz2 samba-b2c9fe4ad18fd4ecb04bc2e3c2896e06418efed0.zip |
lib/util: move tevent_req_poll_ntstatus() to tevent_ntstatus.c
metze
-rw-r--r-- | lib/util/tevent_ntstatus.c | 12 | ||||
-rw-r--r-- | lib/util/tevent_ntstatus.h | 4 | ||||
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/lib/util.c | 11 |
4 files changed, 16 insertions, 14 deletions
diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c index 764d251b59..cbbc698bb1 100644 --- a/lib/util/tevent_ntstatus.c +++ b/lib/util/tevent_ntstatus.c @@ -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; +} diff --git a/lib/util/tevent_ntstatus.h b/lib/util/tevent_ntstatus.h index 4ac9243320..570b6f951a 100644 --- a/lib/util/tevent_ntstatus.h +++ b/lib/util/tevent_ntstatus.h @@ -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 diff --git a/source3/include/proto.h b/source3/include/proto.h index d45ec888f6..f9306b8841 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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); diff --git a/source3/lib/util.c b/source3/lib/util.c index 22c2eb288c..49cd7719e3 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -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)) { |