diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-06 16:46:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:23 +0100 |
commit | fb29325f1d4feba6c3f52b690d3da5d492618c4f (patch) | |
tree | ace2fcbe6a146177a7a16805d9967f907dc674c4 /source4/utils | |
parent | 0f21c092d6c33fe22fef50fef013bdaa1b9b471b (diff) | |
download | samba-fb29325f1d4feba6c3f52b690d3da5d492618c4f.tar.gz samba-fb29325f1d4feba6c3f52b690d3da5d492618c4f.tar.bz2 samba-fb29325f1d4feba6c3f52b690d3da5d492618c4f.zip |
r26312: Move specification of port higher up the call stack.
(This used to be commit 49be7e43ff52a75cb9b4b9e2c3d4c339dbd69416)
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/nmblookup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c index 2ff758d3b0..c0fb31a21f 100644 --- a/source4/utils/nmblookup.c +++ b/source4/utils/nmblookup.c @@ -179,7 +179,7 @@ static NTSTATUS do_node_query(struct nbt_name_socket *nbtsock, } -static bool process_one(const char *name) +static bool process_one(const char *name, int nbt_port) { TALLOC_CTX *tmp_ctx = talloc_new(NULL); enum nbt_name_type node_type = NBT_NAME_CLIENT; @@ -235,17 +235,17 @@ static bool process_one(const char *name) } if (options.broadcast_address) { - status = do_node_query(nbtsock, options.broadcast_address, lp_nbt_port(global_loadparm), + status = do_node_query(nbtsock, options.broadcast_address, nbt_port, node_name, node_type, true); } else if (options.unicast_address) { status = do_node_query(nbtsock, options.unicast_address, - lp_nbt_port(global_loadparm), node_name, node_type, false); + nbt_port, node_name, node_type, false); } else { int i, num_interfaces = iface_count(); for (i=0;i<num_interfaces;i++) { const char *bcast = iface_n_bcast(i); if (bcast == NULL) continue; - status = do_node_query(nbtsock, bcast, lp_nbt_port(global_loadparm), + status = do_node_query(nbtsock, bcast, nbt_port, node_name, node_type, true); if (NT_STATUS_IS_OK(status)) break; } @@ -353,7 +353,7 @@ int main(int argc, const char *argv[]) while (poptPeekArg(pc)) { const char *name = poptGetArg(pc); - ret &= process_one(name); + ret &= process_one(name, lp_nbt_port(global_loadparm)); } poptFreeContext(pc); |