svn commit: samba r26377 - in branches/SAMBA_4_0: . source/libcli
source/libcli/nbt source/utils
jelmer at samba.org
jelmer at samba.org
Mon Dec 10 18:41:30 GMT 2007
Author: jelmer
Date: 2007-12-10 18:41:29 +0000 (Mon, 10 Dec 2007)
New Revision: 26377
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26377
Log:
Specify port explicitly.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/libcli/finddcs.c
branches/SAMBA_4_0/source/libcli/nbt/libnbt.h
branches/SAMBA_4_0/source/libcli/nbt/namequery.c
branches/SAMBA_4_0/source/utils/nmblookup.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/libcli/finddcs.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/finddcs.c 2007-12-10 18:41:19 UTC (rev 26376)
+++ branches/SAMBA_4_0/source/libcli/finddcs.c 2007-12-10 18:41:29 UTC (rev 26377)
@@ -189,6 +189,7 @@
state->node_status.in.name.type = NBT_NAME_CLIENT;
state->node_status.in.name.scope = NULL;
state->node_status.in.dest_addr = state->dcs[0].address;
+ state->node_status.in.dest_port = lp_nbt_port(global_loadparm);
state->node_status.in.timeout = 1;
state->node_status.in.retries = 2;
Modified: branches/SAMBA_4_0/source/libcli/nbt/libnbt.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/libnbt.h 2007-12-10 18:41:19 UTC (rev 26376)
+++ branches/SAMBA_4_0/source/libcli/nbt/libnbt.h 2007-12-10 18:41:29 UTC (rev 26377)
@@ -147,6 +147,7 @@
struct {
struct nbt_name name;
const char *dest_addr;
+ uint16_t dest_port;
int timeout; /* in seconds */
int retries;
} in;
Modified: branches/SAMBA_4_0/source/libcli/nbt/namequery.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/namequery.c 2007-12-10 18:41:19 UTC (rev 26376)
+++ branches/SAMBA_4_0/source/libcli/nbt/namequery.c 2007-12-10 18:41:29 UTC (rev 26377)
@@ -158,7 +158,7 @@
packet->questions[0].question_class = NBT_QCLASS_IP;
dest = socket_address_from_strings(packet, nbtsock->sock->backend_name,
- io->in.dest_addr, lp_nbt_port(global_loadparm));
+ io->in.dest_addr, io->in.dest_port);
if (dest == NULL) goto failed;
req = nbt_name_request_send(nbtsock, dest, packet,
io->in.timeout, io->in.retries, false);
Modified: branches/SAMBA_4_0/source/utils/nmblookup.c
===================================================================
--- branches/SAMBA_4_0/source/utils/nmblookup.c 2007-12-10 18:41:19 UTC (rev 26376)
+++ branches/SAMBA_4_0/source/utils/nmblookup.c 2007-12-10 18:41:29 UTC (rev 26377)
@@ -104,7 +104,7 @@
/* do a single node status */
static bool do_node_status(struct nbt_name_socket *nbtsock,
- const char *addr)
+ const char *addr, uint16_t port)
{
struct nbt_name_status io;
NTSTATUS status;
@@ -113,6 +113,7 @@
io.in.name.type = NBT_NAME_CLIENT;
io.in.name.scope = NULL;
io.in.dest_addr = addr;
+ io.in.dest_port = port;
io.in.timeout = 1;
io.in.retries = 2;
@@ -172,7 +173,7 @@
io.out.name.type);
}
if (options.node_status && io.out.num_addrs > 0) {
- do_node_status(nbtsock, io.out.reply_addrs[0]);
+ do_node_status(nbtsock, io.out.reply_addrs[0], port);
}
return status;
@@ -229,7 +230,7 @@
}
if (options.lookup_by_ip) {
- ret = do_node_status(nbtsock, name);
+ ret = do_node_status(nbtsock, name, nbt_port);
talloc_free(tmp_ctx);
return ret;
}
More information about the samba-cvs
mailing list