summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2003-01-07 04:33:43 +0000
committerChristopher R. Hertel <crh@samba.org>2003-01-07 04:33:43 +0000
commit6693cade73fdbf44392948014acc5d568eaa2c35 (patch)
treefd2175bc3551cd68ee25e665c5e47d454a690dab
parent6d5724f93b60134d555c82fddcadf4d6500a8731 (diff)
downloadsamba-6693cade73fdbf44392948014acc5d568eaa2c35.tar.gz
samba-6693cade73fdbf44392948014acc5d568eaa2c35.tar.bz2
samba-6693cade73fdbf44392948014acc5d568eaa2c35.zip
Added code to the handling of the -M option to ensure that we default to
port 139 for that option. The NetBIOS Messenger Service doesn't run on a non-NBT port. (This used to be commit 02986f3e3a8b0411f7cfbfe11015602fe685a440)
-rw-r--r--source3/client/client.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index feb9e07d16..44fcdb0e8d 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2839,11 +2839,17 @@ static void remember_query_host(const char *arg,
pstrcpy(new_name_resolve_order, optarg);
break;
case 'M':
- name_type = 0x03; /* messages are sent to NetBIOS name type 0x3 */
+ /* Messages are sent to NetBIOS name type 0x3
+ * (Messenger Service). Make sure we default
+ * to port 139 instead of port 445. srl,crh
+ */
+ name_type = 0x03;
pstrcpy(desthost,optarg);
- message = True;
- break;
- case 'i':
+ if( 0 == port )
+ port = 139;
+ message = True;
+ break;
+ case 'i':
set_global_scope(optarg);
break;
case 'N':