Add NET_API_STATUS_SUCCESS define.
authorGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 17:36:06 +0000 (18:36 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 18:37:54 +0000 (19:37 +0100)
Guenther
(This used to be commit a72ad63163a8c642ea762087a739e6d63c37647a)

source3/lib/netapi/netapi.c
source3/lib/netapi/netapi.h

index 9c418f254c10372a7bb80b58e90473dcafba40bf..a37ed7c07247eb0b97b53a32b65c704998869163 100644 (file)
@@ -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,
index 0dd6d95ceb17459f0ed54f224d5dac474f2f64ba..2c6e1269497fb2123fe2c6565360bf18a246fbe5 100644 (file)
@@ -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
 #define __LIB_NETAPI_H__
 
 #define NET_API_STATUS uint32_t
+#define NET_API_STATUS_SUCCESS 0
+
+/****************************************************************
+****************************************************************/
 
 struct libnetapi_ctx {
        const char *debuglevel;