if (stat_ctx && libnetapi_initialized) {
*context = stat_ctx;
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
frame = talloc_stackframe();
*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);
gfree_debugsyms();
- return W_ERROR_V(WERR_OK);
+ return NET_API_STATUS_SUCCESS;
}
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,
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,
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,
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,
/*
* 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;