diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-16 17:14:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:39 -0500 |
commit | b29915d6113264bdce243005d29a1af9a8b69bde (patch) | |
tree | 4eabcbaac1b16408df187f84a05da81a879dc803 /source3/client | |
parent | 0be131725ff90e48d4f9696b80b35b740575fb2c (diff) | |
download | samba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.gz samba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.bz2 samba-b29915d6113264bdce243005d29a1af9a8b69bde.zip |
r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
(This used to be commit 94817a8ef53589011bc4ead4e17807a101acf5c9)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 16 | ||||
-rw-r--r-- | source3/client/smbspool.c | 7 |
2 files changed, 12 insertions, 11 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 70d5bbda6e..1ff63aa836 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -432,7 +432,7 @@ static void init_do_list_queue(void) { reset_do_list_queue(); do_list_queue_size = 1024; - do_list_queue = SMB_MALLOC(do_list_queue_size); + do_list_queue = (char *)SMB_MALLOC(do_list_queue_size); if (do_list_queue == 0) { d_printf("malloc fail for size %d\n", (int)do_list_queue_size); @@ -476,7 +476,7 @@ static void add_to_do_list_queue(const char* entry) do_list_queue_size *= 2; DEBUG(4,("enlarging do_list_queue to %d\n", (int)do_list_queue_size)); - do_list_queue = SMB_REALLOC(do_list_queue, do_list_queue_size); + do_list_queue = (char *)SMB_REALLOC(do_list_queue, do_list_queue_size); if (! do_list_queue) { d_printf("failure enlarging do_list_queue to %d bytes\n", (int)do_list_queue_size); @@ -2879,10 +2879,10 @@ static int cmd_logon(void) else pstrcpy(l_password, buf2); - if (!cli_session_setup(cli, l_username, - l_password, strlen(l_password), - l_password, strlen(l_password), - lp_workgroup())) { + if (!NT_STATUS_IS_OK(cli_session_setup(cli, l_username, + l_password, strlen(l_password), + l_password, strlen(l_password), + lp_workgroup()))) { d_printf("session setup failed: %s\n", cli_errstr(cli)); return -1; } @@ -3198,7 +3198,7 @@ static char **remote_completion(const char *text, int len) if (info.count == 2) info.matches[0] = SMB_STRDUP(info.matches[1]); else { - info.matches[0] = SMB_MALLOC(info.samelen+1); + info.matches[0] = (char *)SMB_MALLOC(info.samelen+1); if (!info.matches[0]) goto cleanup; strncpy(info.matches[0], info.matches[1], info.samelen); @@ -3282,7 +3282,7 @@ static char **completion_fn(const char *text, int start, int end) matches[0] = SMB_STRDUP(matches[1]); break; default: - matches[0] = SMB_MALLOC(samelen+1); + matches[0] = (char *)SMB_MALLOC(samelen+1); if (!matches[0]) goto cleanup; strncpy(matches[0], matches[1], samelen); diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index c9a7fbe10e..5783cbe138 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -429,9 +429,10 @@ static struct cli_state } - if (!cli_session_setup(cli, username, password, strlen(password)+1, - password, strlen(password)+1, - workgroup)) + if (!NT_STATUS_IS_OK(cli_session_setup(cli, username, + password, strlen(password)+1, + password, strlen(password)+1, + workgroup))) { fprintf(stderr,"ERROR: Session setup failed: %s\n", cli_errstr(cli)); if (NT_STATUS_V(cli_nt_error(cli)) == |