summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-23 16:25:57 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-23 16:25:57 +0000
commita896dc299eba12886d800e6c88309d534232cabc (patch)
tree9342cd32cb6d5db11c05b983d40de2d3691f4e4f
parent9c483987a5d136bf23018ade6ceecf603f8f1614 (diff)
downloadsamba-a896dc299eba12886d800e6c88309d534232cabc.tar.gz
samba-a896dc299eba12886d800e6c88309d534232cabc.tar.xz
samba-a896dc299eba12886d800e6c88309d534232cabc.zip
better error reporting for servers that don't do port 445
-rw-r--r--source/lib/util_sock.c2
-rw-r--r--source/libsmb/cliconnect.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index f18fa2e0193..d7a2a2e7b94 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -889,7 +889,7 @@ connect_again:
#endif
if (ret < 0) {
- DEBUG(1,("error connecting to %s:%d (%s)\n",
+ DEBUG(2,("error connecting to %s:%d (%s)\n",
inet_ntoa(*addr),port,strerror(errno)));
close(res);
return -1;
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index eb14f54b1a1..31b35413762 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -600,8 +600,11 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
}
if (cli->fd != -1) cli->port = port;
}
- if (cli->fd == -1)
+ if (cli->fd == -1) {
+ DEBUG(1,("Error connecting to %s (%s)\n",
+ inet_ntoa(*ip),strerror(errno)));
return False;
+ }
set_socket_options(cli->fd,user_socket_options);