svn commit: samba r26381 - in branches/SAMBA_4_0: . source/libcli/nbt source/nbt_server source/torture/nbt

jelmer at samba.org jelmer at samba.org
Mon Dec 10 18:41:48 GMT 2007


Author: jelmer
Date: 2007-12-10 18:41:45 +0000 (Mon, 10 Dec 2007)
New Revision: 26381

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26381

Log:
Move global_loadparm higher up the call stack.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/libcli/nbt/libnbt.h
   branches/SAMBA_4_0/source/libcli/nbt/nameregister.c
   branches/SAMBA_4_0/source/nbt_server/register.c
   branches/SAMBA_4_0/source/torture/nbt/register.c
   branches/SAMBA_4_0/source/torture/nbt/winsbench.c
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.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/nbt/libnbt.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/libnbt.h	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/libcli/nbt/libnbt.h	2007-12-10 18:41:45 UTC (rev 26381)
@@ -163,6 +163,7 @@
 	struct {
 		struct nbt_name name;
 		const char *dest_addr;
+		uint16_t dest_port;
 		const char *address;
 		uint16_t nb_flags;
 		bool register_demand;

Modified: branches/SAMBA_4_0/source/libcli/nbt/nameregister.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/nameregister.c	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/libcli/nbt/nameregister.c	2007-12-10 18:41:45 UTC (rev 26381)
@@ -77,7 +77,7 @@
 	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 @@
 
 	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 @@
 			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 @@
 
 	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;

Modified: branches/SAMBA_4_0/source/nbt_server/register.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/register.c	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/nbt_server/register.c	2007-12-10 18:41:45 UTC (rev 26381)
@@ -93,6 +93,7 @@
 	   registration packets */
 	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        = iname->nb_flags;
 	io.in.ttl             = iname->ttl;

Modified: branches/SAMBA_4_0/source/torture/nbt/register.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/register.c	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/torture/nbt/register.c	2007-12-10 18:41:45 UTC (rev 26381)
@@ -67,6 +67,7 @@
 
 	io.in.name = name;
 	io.in.dest_addr = address;
+	io.in.dest_port = lp_nbt_port(tctx->lp_ctx);
 	io.in.address = myaddress;
 	io.in.nb_flags = NBT_NODE_B | NBT_NM_ACTIVE;
 	io.in.register_demand = false;

Modified: branches/SAMBA_4_0/source/torture/nbt/winsbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsbench.c	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/torture/nbt/winsbench.c	2007-12-10 18:41:45 UTC (rev 26381)
@@ -87,6 +87,7 @@
 
 	io.in.name            = generate_name(tmp_ctx, idx);
 	io.in.dest_addr       = state->wins_server;
+	io.in.dest_port       = lp_nbt_port(global_loadparm);
 	io.in.address         = state->my_ip;
 	io.in.nb_flags        = NBT_NODE_H;
 	io.in.register_demand = false;

Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2007-12-10 18:41:41 UTC (rev 26380)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2007-12-10 18:41:45 UTC (rev 26381)
@@ -6530,6 +6530,7 @@
 		 */
 		name_register->in.name		= records[i].name;
 		name_register->in.dest_addr	= ctx->address;
+		name_register->in.dest_port	= lp_nbt_port(tctx->lp_ctx);
 		name_register->in.address	= records[i].wins.ips[0].ip;
 		name_register->in.nb_flags	= records[i].wins.nb_flags;
 		name_register->in.register_demand= false;
@@ -9218,6 +9219,7 @@
 
 			name_register->in.name		= records[i].name;
 			name_register->in.dest_addr	= ctx->address;
+			name_register->in.dest_port     = lp_nbt_port(tctx->lp_ctx);
 			name_register->in.address	= records[i].wins.ips[j].ip;
 			name_register->in.nb_flags	= records[i].wins.nb_flags;
 			name_register->in.register_demand= false;



More information about the samba-cvs mailing list