summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-24 02:32:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:01:06 -0500
commit0c3194816b513e3743ddcacd1eca2b683ca39b88 (patch)
tree49dfb6a30aabff84d14fcc6bacfa8a437f49c13d /source3/libsmb
parent64d4ff5dcc24d8dfd104b340816d2c89b7735a85 (diff)
downloadsamba-0c3194816b513e3743ddcacd1eca2b683ca39b88.tar.gz
samba-0c3194816b513e3743ddcacd1eca2b683ca39b88.tar.bz2
samba-0c3194816b513e3743ddcacd1eca2b683ca39b88.zip
r18865: fixed some of the most obvious NTSTATUS/WERROR mixups in Samba3. It
still doesn't compile with immediate structures and the NTSTATUS/WERROR separation, as there are still several places where the two error types are mixed up. I haven't fixed those as they require decisions about the rpcclient code that I really don't want to get into (the error handling there is a mess) So samba3 compiles now, but only becaise HAVE_IMMEDIATE_STRUCTURES is not used (look for HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED) (This used to be commit 8438a6a7d4506d395c8b4bd0e99f9c100e5e3c4e)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clierror.c2
-rw-r--r--source3/libsmb/libsmbclient.c6
-rw-r--r--source3/libsmb/nterr.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index 01c42bd36a..fcedc3bdab 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -226,7 +226,7 @@ void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode)
}
/* Return a UNIX errno from a NT status code */
-struct {
+static const struct {
NTSTATUS status;
int error;
} nt_errno_map[] = {
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 2af72d670f..6be7dbe8d6 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -2472,7 +2472,7 @@ net_share_enum_rpc(struct cli_state *cli,
void *state)
{
int i;
- WERROR result;
+ NTSTATUS result;
uint32 enum_hnd;
uint32 info_level = 1;
uint32 preferred_len = 0xffffffff;
@@ -2509,7 +2509,7 @@ net_share_enum_rpc(struct cli_state *cli,
&enum_hnd);
/* Was it successful? */
- if (!W_ERROR_IS_OK(result) || numentries == 0) {
+ if (!NT_STATUS_IS_OK(result) || numentries == 0) {
/* Nope. Go clean up. */
goto done;
}
@@ -2531,7 +2531,7 @@ done:
TALLOC_FREE(mem_ctx);
/* Tell 'em if it worked */
- return W_ERROR_IS_OK(result) ? 0 : -1;
+ return NT_STATUS_IS_OK(result) ? 0 : -1;
}
diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c
index e874b80473..2e4b1106af 100644
--- a/source3/libsmb/nterr.c
+++ b/source3/libsmb/nterr.c
@@ -28,7 +28,7 @@ typedef const struct
NTSTATUS nt_errcode;
} nt_err_code_struct;
-static nt_err_code_struct nt_errs[] =
+static const nt_err_code_struct nt_errs[] =
{
{ "NT_STATUS_OK", NT_STATUS_OK },
{ "NT_STATUS_UNSUCCESSFUL", NT_STATUS_UNSUCCESSFUL },