summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-12-18 02:29:50 +0100
committerGünther Deschner <gd@samba.org>2007-12-21 15:29:10 +0100
commit3d853b8e7e975a3e1c07a125e775e3a597112912 (patch)
treeb608f63ffc3671277ec30cbfe7bf3bd43afbc51e
parent4dd84b351125cdd95c945d8820ffe078f7325988 (diff)
downloadsamba-3d853b8e7e975a3e1c07a125e775e3a597112912.tar.gz
samba-3d853b8e7e975a3e1c07a125e775e3a597112912.tar.bz2
samba-3d853b8e7e975a3e1c07a125e775e3a597112912.zip
Move basic libnetapi functions to NET_API_STATUS.
Guenther (This used to be commit 086c55005976b3173e915e465108214876aa5bd6)
-rw-r--r--source3/lib/netapi/netapi.c14
-rw-r--r--source3/lib/netapi/netapi.h4
2 files changed, 9 insertions, 9 deletions
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"