summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-10 18:41:45 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:16 +0100
commit274d07ddff5c5920b9a2f3674e9104d8aab9e90c (patch)
treeb71d88bb17279fa5abb1dd035babfa05510c92ad /source4/libcli/nbt
parent237059838ccba8daae761f073f354eda536cbc84 (diff)
downloadsamba-274d07ddff5c5920b9a2f3674e9104d8aab9e90c.tar.gz
samba-274d07ddff5c5920b9a2f3674e9104d8aab9e90c.tar.bz2
samba-274d07ddff5c5920b9a2f3674e9104d8aab9e90c.zip
r26381: Move global_loadparm higher up the call stack.
(This used to be commit 992296767492ecd7d21b06f4a08a5b8d73d00740)
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r--source4/libcli/nbt/libnbt.h1
-rw-r--r--source4/libcli/nbt/nameregister.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/nbt/libnbt.h b/source4/libcli/nbt/libnbt.h
index 88ca0e204b..524391917d 100644
--- a/source4/libcli/nbt/libnbt.h
+++ b/source4/libcli/nbt/libnbt.h
@@ -163,6 +163,7 @@ struct nbt_name_register {
struct {
struct nbt_name name;
const char *dest_addr;
+ uint16_t dest_port;
const char *address;
uint16_t nb_flags;
bool register_demand;
diff --git a/source4/libcli/nbt/nameregister.c b/source4/libcli/nbt/nameregister.c
index fd4a94dd44..9389981647 100644
--- a/source4/libcli/nbt/nameregister.c
+++ b/source4/libcli/nbt/nameregister.c
@@ -77,7 +77,7 @@ struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock,
if (packet->additional[0].rdata.netbios.addresses[0].ipaddr == NULL) goto failed;
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);
@@ -224,6 +224,7 @@ struct composite_context *nbt_name_register_bcast_send(struct nbt_name_socket *n
state->io->in.name = io->in.name;
state->io->in.dest_addr = io->in.dest_addr;
+ state->io->in.dest_port = lp_nbt_port(global_loadparm);
state->io->in.address = io->in.address;
state->io->in.nb_flags = io->in.nb_flags;
state->io->in.register_demand = false;
@@ -311,6 +312,7 @@ static void name_register_wins_handler(struct nbt_name_request *req)
goto done;
}
state->io->in.dest_addr = state->wins_servers[0];
+ state->io->in.dest_port = lp_nbt_port(global_loadparm);
state->io->in.address = state->addresses[0];
state->req = nbt_name_register_send(state->nbtsock, state->io);
if (state->req == NULL) {
@@ -377,6 +379,7 @@ struct composite_context *nbt_name_register_wins_send(struct nbt_name_socket *nb
state->io->in.name = io->in.name;
state->io->in.dest_addr = state->wins_servers[0];
+ state->io->in.dest_port = lp_nbt_port(global_loadparm);
state->io->in.address = io->in.addresses[0];
state->io->in.nb_flags = io->in.nb_flags;
state->io->in.broadcast = false;