summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-12 02:15:20 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:39 +0100
commit33582dffcc2d348dc042edfdcccee7500b21d928 (patch)
tree81a2322009015ae2eb85143fca99e79910502361 /source4/nbt_server
parent46b54defe9ae60646ba0a85dc67a1dcf65b0ed83 (diff)
downloadsamba-33582dffcc2d348dc042edfdcccee7500b21d928.tar.gz
samba-33582dffcc2d348dc042edfdcccee7500b21d928.tar.bz2
samba-33582dffcc2d348dc042edfdcccee7500b21d928.zip
r26408: Remove use of global_loadparm.
(This used to be commit f933b4362124bfdd25544b4e27992d9ca4405848)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/register.c1
-rw-r--r--source4/nbt_server/wins/winsclient.c1
-rw-r--r--source4/nbt_server/wins/winsserver.c1
-rw-r--r--source4/nbt_server/wins/winsserver.h1
-rw-r--r--source4/nbt_server/wins/winswack.c7
5 files changed, 9 insertions, 2 deletions
diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c
index bde9b1e2db..a17d503190 100644
--- a/source4/nbt_server/register.c
+++ b/source4/nbt_server/register.c
@@ -211,6 +211,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
/* setup a broadcast name registration request */
io.in.name = iname->name;
io.in.dest_addr = iface->bcast_address;
+ io.in.dest_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
io.in.address = iface->ip_address;
io.in.nb_flags = nb_flags;
io.in.ttl = iname->ttl;
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c
index 046be28515..001ad58f62 100644
--- a/source4/nbt_server/wins/winsclient.c
+++ b/source4/nbt_server/wins/winsclient.c
@@ -141,6 +141,7 @@ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
/* setup a wins name refresh request */
io.in.name = iname->name;
io.in.wins_servers = str_list_make(tmp_ctx, iname->wins_server, NULL);
+ io.in.wins_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
io.in.addresses = nbtd_address_list(iface, tmp_ctx);
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index 6219e6de68..693e667078 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -378,6 +378,7 @@ static void wins_register_wack(struct nbt_name_socket *nbtsock,
if (talloc_reference(s, src) == NULL) goto failed;
s->io.in.nbtd_server = iface->nbtsrv;
+ s->io.in.nbtd_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
s->io.in.event_ctx = iface->nbtsrv->task->event_ctx;
s->io.in.name = rec->name;
s->io.in.num_addresses = winsdb_addr_list_length(rec->addresses);
diff --git a/source4/nbt_server/wins/winsserver.h b/source4/nbt_server/wins/winsserver.h
index 15dd4bd3db..edb924c1e3 100644
--- a/source4/nbt_server/wins/winsserver.h
+++ b/source4/nbt_server/wins/winsserver.h
@@ -51,6 +51,7 @@ struct wins_server {
struct wins_challenge_io {
struct {
struct nbtd_server *nbtd_server;
+ uint16_t nbt_port;
struct event_context *event_ctx;
struct nbt_name *name;
uint32_t num_addresses;
diff --git a/source4/nbt_server/wins/winswack.c b/source4/nbt_server/wins/winswack.c
index 82b16bb20d..6dc90af317 100644
--- a/source4/nbt_server/wins/winswack.c
+++ b/source4/nbt_server/wins/winswack.c
@@ -47,7 +47,7 @@ static void wins_challenge_handler(struct nbt_name_request *req)
if (state->current_address < state->io->in.num_addresses) {
struct nbtd_interface *iface;
- state->query.in.dest_port = lp_nbt_port(global_loadparm);
+ state->query.in.dest_port = state->io->in.nbt_port;
state->query.in.dest_addr = state->io->in.addresses[state->current_address];
iface = nbtd_find_request_iface(state->io->in.nbtd_server, state->query.in.dest_addr, true);
@@ -105,7 +105,7 @@ struct composite_context *wins_challenge_send(TALLOC_CTX *mem_ctx, struct wins_c
/* setup a name query to the first address */
state->query.in.name = *state->io->in.name;
- state->query.in.dest_port = lp_nbt_port(global_loadparm);
+ state->query.in.dest_port = state->io->in.nbt_port;
state->query.in.dest_addr = state->io->in.addresses[state->current_address];
state->query.in.broadcast = false;
state->query.in.wins_lookup = true;
@@ -162,6 +162,7 @@ static void wins_release_demand_handler(struct nbt_name_request *req)
if (state->current_address < state->io->in.num_addresses) {
struct nbtd_interface *iface;
+ state->release.in.dest_port = lp_nbt_port(global_loadparm);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.timeout = (state->addresses_left > 1 ? 2 : 1);
@@ -221,6 +222,7 @@ static struct composite_context *wins_release_demand_send(TALLOC_CTX *mem_ctx, s
* with 2 retries
*/
state->release.in.name = *state->io->in.name;
+ state->release.in.dest_port = lp_nbt_port(global_loadparm);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.broadcast = false;
@@ -303,6 +305,7 @@ NTSTATUS nbtd_proxy_wins_challenge(struct irpc_message *msg,
s->req = req;
s->io.in.nbtd_server = nbtd_server;
+ s->io.in.nbt_port = lp_nbt_port(global_loadparm);
s->io.in.event_ctx = msg->ev;
s->io.in.name = &req->in.name;
s->io.in.num_addresses = req->in.num_addrs;