]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
better error reporting for servers that don't do port 445
authorAndrew Tridgell <tridge@samba.org>
Thu, 23 Aug 2001 16:25:57 +0000 (16:25 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 23 Aug 2001 16:25:57 +0000 (16:25 +0000)
(This used to be commit a896dc299eba12886d800e6c88309d534232cabc)

source3/lib/util_sock.c
source3/libsmb/cliconnect.c

index f18fa2e01934f1586075d3fe2482e0af0e9fe524..d7a2a2e7b9407a4c8399914277a9e471d4ba58c8 100644 (file)
@@ -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;
index eb14f54b1a10cbe0526bc471a2b7c2bf1a9a8637..31b354137622c2bf8f074a0b22472745336ca86c 100644 (file)
@@ -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);