diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 6 | ||||
-rw-r--r-- | source3/client/smbmount.c | 4 | ||||
-rw-r--r-- | source3/client/smbspool.c | 6 |
3 files changed, 5 insertions, 11 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 29e23654fb..88191347b1 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -29,7 +29,7 @@ struct cli_state *cli; extern BOOL in_client; -static int port = SMB_PORT; +static int port = 0; pstring cur_dir = "\\"; pstring cd_path = ""; static pstring service; @@ -1995,7 +1995,7 @@ struct cli_state *do_connect(const char *server, const char *share) if (have_ip) ip = dest_ip; /* have to open a new connection */ - if (!(c=cli_initialise(NULL)) || (cli_set_port(c, port) == 0) || + if (!(c=cli_initialise(NULL)) || (cli_set_port(c, port) != port) || !cli_connect(c, server_n, &ip)) { DEBUG(0,("Connection to %s failed\n", server_n)); return NULL; @@ -2253,7 +2253,7 @@ static int do_message_op(void) ip = ipzero; if (have_ip) ip = dest_ip; - if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) { + if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) != port) || !cli_connect(cli, desthost, &ip)) { DEBUG(0,("Connection to %s failed\n", desthost)); return 1; } diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index d0c18e6134..71c7e29810 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -46,7 +46,7 @@ static pstring options; static struct in_addr dest_ip; static BOOL have_ip; -static int smb_port = 139; +static int smb_port = 0; static BOOL got_pass; static uid_t mount_uid; static gid_t mount_gid; @@ -148,7 +148,7 @@ static struct cli_state *do_connection(char *service) if (have_ip) ip = dest_ip; /* have to open a new connection */ - if (!(c=cli_initialise(NULL)) || (cli_set_port(c, smb_port) == 0) || + if (!(c=cli_initialise(NULL)) || (cli_set_port(c, smb_port) != port) || !cli_connect(c, server_n, &ip)) { DEBUG(0,("%d: Connection to %s failed\n", getpid(), server_n)); if (c) { diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 0c21399e96..69454825f8 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -302,12 +302,6 @@ smb_connect(char *workgroup, /* I - Workgroup */ return (NULL); } - if (!cli_set_port(c, SMB_PORT)) - { - fputs("ERROR: cli_set_port() failed...\n", stderr); - return (NULL); - } - if (!cli_connect(c, server, &ip)) { fputs("ERROR: cli_connect() failed...\n", stderr); |