We get the server and workgroup list only over port 139. Fall back to that
authorVolker Lendecke <vlendec@samba.org>
Sun, 10 Aug 2003 21:43:28 +0000 (21:43 +0000)
committerVolker Lendecke <vlendec@samba.org>
Sun, 10 Aug 2003 21:43:28 +0000 (21:43 +0000)
and if NetBIOS over TCP/IP is disabled, give an error message.

Fixes Bug #284

Volker
(This used to be commit a2902a6cf8d05569d1c690436f69b4a4cedac400)

source3/client/client.c

index 036be361754f17b319ee24c77376b2b7aa375dbd..262ac417981281c0e1f69551d31c64fc6cae4a1b 100644 (file)
@@ -2650,6 +2650,22 @@ static int do_host_query(char *query_host)
                return 1;
 
        browse_host(True);
+
+       if (port != 139) {
+
+               /* Workgroups simply don't make sense over anything
+                  else but port 139... */
+
+               cli_shutdown(cli);
+               port = 139;
+               cli = do_connect(query_host, "IPC$");
+       }
+
+       if (cli == NULL) {
+               d_printf("NetBIOS over TCP disabled -- no workgroup available\n");
+               return 1;
+       }
+
        list_servers(lp_workgroup());
 
        cli_shutdown(cli);