summaryrefslogtreecommitdiff
path: root/source4/libcli/dgram/browse.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 12:22:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:52 -0500
commitfccbbf354634b31c9c3cb2bca15843f13e3b77f9 (patch)
tree6678adb19a88171fce5569d2183e212d08753aba /source4/libcli/dgram/browse.c
parent0b0c38d899db75e6954af2618e7f063dbfc09fd6 (diff)
downloadsamba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.tar.gz
samba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.tar.bz2
samba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.zip
r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere (tridge: can you review this please, (make test works) metze (This used to be commit a599d7a4ae881c94be2c2d908a398838549942bb)
Diffstat (limited to 'source4/libcli/dgram/browse.c')
-rw-r--r--source4/libcli/dgram/browse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libcli/dgram/browse.c b/source4/libcli/dgram/browse.c
index a304db9c9d..d6813b36b9 100644
--- a/source4/libcli/dgram/browse.c
+++ b/source4/libcli/dgram/browse.c
@@ -29,7 +29,7 @@
#include "librpc/gen_ndr/ndr_nbt.h"
NTSTATUS dgram_mailslot_browse_send(struct nbt_dgram_socket *dgmsock,
- struct nbt_name *dest_name, const char *dest_address, int dest_port,
+ struct nbt_name *dest_name, const struct nbt_peer_socket *dest,
struct nbt_name *src_name, struct nbt_browse_packet *request)
{
NTSTATUS status;
@@ -45,7 +45,7 @@ NTSTATUS dgram_mailslot_browse_send(struct nbt_dgram_socket *dgmsock,
status = dgram_mailslot_send(dgmsock, DGRAM_DIRECT_UNIQUE,
NBT_MAILSLOT_BROWSE,
- dest_name, dest_address, dest_port,
+ dest_name, dest,
src_name, &blob);
talloc_free(tmp_ctx);
return status;
@@ -59,6 +59,7 @@ NTSTATUS dgram_mailslot_browse_reply(struct nbt_dgram_socket *dgmsock,
DATA_BLOB blob;
TALLOC_CTX *tmp_ctx = talloc_new(dgmsock);
struct nbt_name myname;
+ struct nbt_peer_socket dest;
status = ndr_push_struct_blob(&blob, tmp_ctx, reply,
(ndr_push_flags_fn_t)ndr_push_nbt_browse_packet);
@@ -69,10 +70,12 @@ NTSTATUS dgram_mailslot_browse_reply(struct nbt_dgram_socket *dgmsock,
make_nbt_name_client(&myname, lp_netbios_name());
+ dest.port = request->src_port;
+ dest.addr = request->src_addr;
status = dgram_mailslot_send(dgmsock, DGRAM_DIRECT_UNIQUE,
mailslot_name,
&request->data.msg.source_name,
- request->source, request->src_port,
+ &dest,
&myname, &blob);
talloc_free(tmp_ctx);
return status;