summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/getdc.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-18 02:38:35 +0100
committerGünther Deschner <gd@samba.org>2008-01-18 02:55:10 +0100
commitb1424846c60848d685853fcf632ab766543e05ee (patch)
tree73bb9505e25028ba22e33814bdc3db24cd94ec2f /source3/lib/netapi/getdc.c
parentcfb7e254662dd957da7e193010f87544b96c2f17 (diff)
downloadsamba-b1424846c60848d685853fcf632ab766543e05ee.tar.gz
samba-b1424846c60848d685853fcf632ab766543e05ee.tar.bz2
samba-b1424846c60848d685853fcf632ab766543e05ee.zip
Cosmetics and error string reporting for libnetapi.
Guenther (This used to be commit 4ca33928512bd71268bafd41d2b608e814a7295f)
Diffstat (limited to 'source3/lib/netapi/getdc.c')
-rw-r--r--source3/lib/netapi/getdc.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/source3/lib/netapi/getdc.c b/source3/lib/netapi/getdc.c
index 484af04a55..1084ddc3c8 100644
--- a/source3/lib/netapi/getdc.c
+++ b/source3/lib/netapi/getdc.c
@@ -22,6 +22,9 @@
#include "lib/netapi/netapi.h"
#include "libnet/libnet.h"
+/********************************************************************
+********************************************************************/
+
static WERROR NetGetDCNameLocal(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -30,6 +33,9 @@ static WERROR NetGetDCNameLocal(struct libnetapi_ctx *ctx,
return WERR_NOT_SUPPORTED;
}
+/********************************************************************
+********************************************************************/
+
static WERROR NetGetDCNameRemote(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -73,6 +79,9 @@ static WERROR NetGetDCNameRemote(struct libnetapi_ctx *ctx,
return werr;
}
+/********************************************************************
+********************************************************************/
+
static WERROR libnetapi_NetGetDCName(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -91,6 +100,10 @@ static WERROR libnetapi_NetGetDCName(struct libnetapi_ctx *ctx,
buffer);
}
+/****************************************************************
+ NetGetDCName
+****************************************************************/
+
NET_API_STATUS NetGetDCName(const char *server_name,
const char *domain_name,
uint8_t **buffer)
@@ -112,9 +125,12 @@ NET_API_STATUS NetGetDCName(const char *server_name,
return W_ERROR_V(werr);
}
- return 0;
+ return NET_API_STATUS_SUCCESS;
}
+/********************************************************************
+********************************************************************/
+
static WERROR NetGetAnyDCNameLocal(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -123,6 +139,9 @@ static WERROR NetGetAnyDCNameLocal(struct libnetapi_ctx *ctx,
return WERR_NOT_SUPPORTED;
}
+/********************************************************************
+********************************************************************/
+
static WERROR NetGetAnyDCNameRemote(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -170,6 +189,9 @@ static WERROR NetGetAnyDCNameRemote(struct libnetapi_ctx *ctx,
}
+/********************************************************************
+********************************************************************/
+
static WERROR libnetapi_NetGetAnyDCName(struct libnetapi_ctx *ctx,
const char *server_name,
const char *domain_name,
@@ -188,6 +210,10 @@ static WERROR libnetapi_NetGetAnyDCName(struct libnetapi_ctx *ctx,
buffer);
}
+/****************************************************************
+ NetGetAnyDCName
+****************************************************************/
+
NET_API_STATUS NetGetAnyDCName(const char *server_name,
const char *domain_name,
uint8_t **buffer)
@@ -209,5 +235,5 @@ NET_API_STATUS NetGetAnyDCName(const char *server_name,
return W_ERROR_V(werr);
}
- return 0;
+ return NET_API_STATUS_SUCCESS;
}