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/utils/smbfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c index 23f47550fa..33f1a90cf9 100644 --- a/source3/utils/smbfilter.c +++ b/source3/utils/smbfilter.c @@ -180,7 +180,7 @@ static void filter_child(int c, struct sockaddr_storage *dest_ss) int s = -1; /* we have a connection from a new client, now connect to the server */ - status = open_socket_out(dest_ss, 445, LONG_CONNECT_TIMEOUT, &s); + status = open_socket_out(dest_ss, TCP_SMB_PORT, LONG_CONNECT_TIMEOUT, &s); if (s == -1) { char addr[INET6_ADDRSTRLEN]; @@ -278,7 +278,7 @@ static void start_filter(char *desthost) /* start listening on port 445 locally */ zero_sockaddr(&my_ss); - s = open_socket_in(SOCK_STREAM, 445, 0, &my_ss, True); + s = open_socket_in(SOCK_STREAM, TCP_SMB_PORT, 0, &my_ss, True); if (s == -1) { d_printf("bind failed\n"); -- cgit