summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/netapi/netapi.c18
-rw-r--r--source3/lib/netapi/netapi.h6
2 files changed, 14 insertions, 10 deletions
diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index 9c418f254c..a37ed7c072 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -32,7 +32,7 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context)
if (stat_ctx && libnetapi_initialized) {
*context = stat_ctx;
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
frame = talloc_stackframe();
@@ -69,14 +69,14 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context)
*context = stat_ctx = ctx;
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx)
{
if (stat_ctx) {
*ctx = stat_ctx;
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
return libnetapi_init(ctx);
@@ -98,7 +98,7 @@ NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx)
gfree_debugsyms();
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx,
@@ -109,14 +109,14 @@ NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx,
if (!debug_parse_levels(debuglevel)) {
return W_ERROR_V(WERR_GENERAL_FAILURE);
}
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx,
const char **debuglevel)
{
*debuglevel = ctx->debuglevel;
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
@@ -127,7 +127,7 @@ NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
if (!ctx->username) {
return W_ERROR_V(WERR_NOMEM);
}
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx,
@@ -138,7 +138,7 @@ NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx,
if (!ctx->password) {
return W_ERROR_V(WERR_NOMEM);
}
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
@@ -149,7 +149,7 @@ NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
if (!ctx->workgroup) {
return W_ERROR_V(WERR_NOMEM);
}
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
const char *libnetapi_errstr(struct libnetapi_ctx *ctx,
diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h
index 0dd6d95ceb..2c6e126949 100644
--- a/source3/lib/netapi/netapi.h
+++ b/source3/lib/netapi/netapi.h
@@ -1,7 +1,7 @@
/*
* Unix SMB/CIFS implementation.
* NetApi Support
- * Copyright (C) Guenther Deschner 2007
+ * Copyright (C) Guenther Deschner 2007-2008
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,6 +21,10 @@
#define __LIB_NETAPI_H__
#define NET_API_STATUS uint32_t
+#define NET_API_STATUS_SUCCESS 0
+
+/****************************************************************
+****************************************************************/
struct libnetapi_ctx {
const char *debuglevel;