From 3d853b8e7e975a3e1c07a125e775e3a597112912 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:29:50 +0100 Subject: Move basic libnetapi functions to NET_API_STATUS. Guenther (This used to be commit 086c55005976b3173e915e465108214876aa5bd6) --- source3/lib/netapi/netapi.c | 14 +++++++------- source3/lib/netapi/netapi.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source3/lib/netapi') diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 3da492bbe7..898e62d6a5 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -24,13 +24,13 @@ extern bool AllowDebugChange; static bool libnetapi_initialized = false; -WERROR libnetapi_init(struct libnetapi_ctx **context) +NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context) { struct libnetapi_ctx *ctx = NULL; TALLOC_CTX *frame = NULL; if (libnetapi_initialized) { - return WERR_OK; + return W_ERROR_V(WERR_OK); } frame = talloc_stackframe(); @@ -38,7 +38,7 @@ WERROR libnetapi_init(struct libnetapi_ctx **context) ctx = talloc_zero(frame, struct libnetapi_ctx); if (!ctx) { TALLOC_FREE(frame); - return WERR_NOMEM; + return W_ERROR_V(WERR_NOMEM); } DEBUGLEVEL = 0; @@ -53,7 +53,7 @@ WERROR libnetapi_init(struct libnetapi_ctx **context) if (!lp_load(get_dyn_CONFIGFILE(), true, false, false, false)) { TALLOC_FREE(frame); - return WERR_GENERAL_FAILURE; + return W_ERROR_V(WERR_GENERAL_FAILURE); } init_names(); @@ -66,11 +66,11 @@ WERROR libnetapi_init(struct libnetapi_ctx **context) *context = ctx; - return WERR_OK; + return W_ERROR_V(WERR_OK); } -WERROR libnetapi_free(struct libnetapi_ctx *ctx) +NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx) { TALLOC_FREE(ctx); - return WERR_OK; + return W_ERROR_V(WERR_OK); } diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 7946cfb446..3dfbc0cffb 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -29,8 +29,8 @@ struct libnetapi_ctx { char *password; }; -WERROR libnetapi_init(struct libnetapi_ctx **ctx); -WERROR libnetapi_free(struct libnetapi_ctx *ctx); +NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); +NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); #include "joindomain.h" -- cgit