svn commit: samba r26380 - in branches/SAMBA_4_0: .
source/libcli/nbt source/torture/nbt
jelmer at samba.org
jelmer at samba.org
Mon Dec 10 18:41:42 GMT 2007
Author: jelmer
Date: 2007-12-10 18:41:41 +0000 (Mon, 10 Dec 2007)
New Revision: 26380
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26380
Log:
Specify port number 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/namerefresh.c
branches/SAMBA_4_0/source/torture/nbt/register.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:38 UTC (rev 26379)
+++ branches/SAMBA_4_0/source/libcli/nbt/libnbt.h 2007-12-10 18:41:41 UTC (rev 26380)
@@ -215,6 +215,7 @@
struct {
struct nbt_name name;
const char *dest_addr;
+ uint16_t dest_port;
const char *address;
uint16_t nb_flags;
bool broadcast;
Modified: branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c 2007-12-10 18:41:38 UTC (rev 26379)
+++ branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c 2007-12-10 18:41:41 UTC (rev 26380)
@@ -69,7 +69,7 @@
dest = socket_address_from_strings(nbtsock,
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);
@@ -174,6 +174,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_refresh_send(state->nbtsock, state->io);
if (state->req == NULL) {
@@ -212,7 +213,7 @@
}
}
-/*
+/**
the async send call for a multi-server WINS refresh
*/
struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbtsock,
@@ -240,6 +241,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/torture/nbt/register.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/register.c 2007-12-10 18:41:38 UTC (rev 26379)
+++ branches/SAMBA_4_0/source/torture/nbt/register.c 2007-12-10 18:41:41 UTC (rev 26380)
@@ -26,6 +26,7 @@
#include "lib/socket/netif.h"
#include "torture/torture.h"
#include "torture/nbt/proto.h"
+#include "param/param.h"
#define CHECK_VALUE(tctx, v, correct) \
torture_assert_int_equal(tctx, v, correct, "Incorrect value")
@@ -132,6 +133,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.broadcast = false;
More information about the samba-cvs
mailing list