From b5b204184aa6d0f14e7d3bd08322a98dc4f432e6 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel (crh)" Date: Tue, 14 Feb 2012 21:51:35 -0600 Subject: Rename obscure defined constants. Replaced the undescriptive SMB_PORT1 and SMB_PORT2 defined constants with the slightly more descriptive names NBT_SMB_PORT and TCP_SMB_PORT. Also replaced several hard-coded references to the well-known port numbers (139 and 445, respectively) as appropriate. Small changes to clarify some comments regarding the two transport types. Signed-off-by: Simo Sorce Autobuild-User: Simo Sorce Autobuild-Date: Thu Feb 16 08:29:41 CET 2012 on sn-devel-104 --- source3/client/client.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index 89fd1d4895..9d4ef158f2 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -5168,7 +5168,7 @@ static int do_host_query(const char *query_host) } } - if (port != 139) { + if (port != NBT_SMB_PORT) { /* Workgroups simply don't make sense over anything else but port 139... */ @@ -5177,7 +5177,8 @@ static int do_host_query(const char *query_host) status = cli_cm_open(talloc_tos(), NULL, have_ip ? dest_ss_str : query_host, "IPC$", auth_info, true, smb_encrypt, - max_protocol, 139, name_type, &cli); + max_protocol, NBT_SMB_PORT, name_type, + &cli); if (!NT_STATUS_IS_OK(status)) { cli = NULL; } @@ -5242,7 +5243,7 @@ static int do_message_op(struct user_auth_info *a_info) NTSTATUS status; status = cli_connect_nb(desthost, have_ip ? &dest_ss : NULL, - port ? port : 139, name_type, + port ? port : NBT_SMB_PORT, name_type, lp_netbios_name(), SMB_SIGNING_DEFAULT, 0, &cli); if (!NT_STATUS_IS_OK(status)) { d_printf("Connection to %s failed. Error %s\n", desthost, nt_errstr(status)); @@ -5354,7 +5355,7 @@ static int do_message_op(struct user_auth_info *a_info) exit(ENOMEM); } if( !port ) - port = 139; + port = NBT_SMB_PORT; message = true; break; case 'I': -- cgit