summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-03-06 22:55:45 +0000
committerTim Potter <tpot@samba.org>2002-03-06 22:55:45 +0000
commit87a3a0952c36bed774bcad884d14d749f4bb491d (patch)
tree6d66b2b3c35e9c394e992044dff96b7eeafb6e4e
parent86a9be69d3cc5ab569716dad5ba1eea9809a4771 (diff)
downloadsamba-87a3a0952c36bed774bcad884d14d749f4bb491d.tar.gz
samba-87a3a0952c36bed774bcad884d14d749f4bb491d.tar.bz2
samba-87a3a0952c36bed774bcad884d14d749f4bb491d.zip
Removed duplicate \n from debug message.
Small tidyups. (This used to be commit 252da94ebb279c47263dfae36fd016d0a29a6dbf)
-rw-r--r--source3/libsmb/cliconnect.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index b7828f4993..d9df1fa640 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1206,9 +1206,8 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
struct cli_state *cli;
struct in_addr ip;
- if (!output_cli) {
+ if (!output_cli)
DEBUG(0, ("output_cli is NULL!?!"));
- }
*output_cli = NULL;
@@ -1217,9 +1216,8 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
again:
- if (!(cli = cli_initialise(NULL))) {
+ if (!(cli = cli_initialise(NULL)))
return NT_STATUS_NO_MEMORY;
- }
if (cli_set_port(cli, port) != port) {
cli_shutdown(cli);
@@ -1228,11 +1226,9 @@ again:
ip = *dest_ip;
- DEBUG(3,("Connecting to host=%s share=%s\n\n",
- dest_host, service));
+ DEBUG(3,("Connecting to host=%s share=%s\n", dest_host, service));
- if (!cli_connect(cli, dest_host, &ip))
- {
+ if (!cli_connect(cli, dest_host, &ip)) {
DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
nmb_namestr(&called), inet_ntoa(*dest_ip)));
cli_shutdown(cli);
@@ -1255,35 +1251,31 @@ again:
return NT_STATUS_UNSUCCESSFUL;
}
- if (!cli_negprot(cli))
- {
+ if (!cli_negprot(cli)) {
DEBUG(1,("failed negprot\n"));
nt_status = NT_STATUS_UNSUCCESSFUL;
cli_shutdown(cli);
return nt_status;
}
- if (!cli_session_setup(cli, user,
- password, pass_len,
- NULL, 0,
- domain))
- {
+ if (!cli_session_setup(cli, user, password, pass_len, NULL, 0,
+ domain)) {
DEBUG(1,("failed session setup\n"));
nt_status = cli_nt_error(cli);
cli_shutdown(cli);
- if (NT_STATUS_IS_OK(nt_status)) nt_status = NT_STATUS_UNSUCCESSFUL;
+ if (NT_STATUS_IS_OK(nt_status))
+ nt_status = NT_STATUS_UNSUCCESSFUL;
return nt_status;
}
- if (service)
- {
+ if (service) {
if (!cli_send_tconX(cli, service, service_type,
- (char*)password, pass_len))
- {
+ (char*)password, pass_len)) {
DEBUG(1,("failed tcon_X\n"));
nt_status = cli_nt_error(cli);
cli_shutdown(cli);
- if (NT_STATUS_IS_OK(nt_status)) nt_status = NT_STATUS_UNSUCCESSFUL;
+ if (NT_STATUS_IS_OK(nt_status))
+ nt_status = NT_STATUS_UNSUCCESSFUL;
return nt_status;
}
}