diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-10-14 12:22:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:52 -0500 |
commit | fccbbf354634b31c9c3cb2bca15843f13e3b77f9 (patch) | |
tree | 6678adb19a88171fce5569d2183e212d08753aba /source4/libcli/dgram/netlogon.c | |
parent | 0b0c38d899db75e6954af2618e7f063dbfc09fd6 (diff) | |
download | samba-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/netlogon.c')
-rw-r--r-- | source4/libcli/dgram/netlogon.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c index dda77689de..0627fe900c 100644 --- a/source4/libcli/dgram/netlogon.c +++ b/source4/libcli/dgram/netlogon.c @@ -33,8 +33,7 @@ */ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock, struct nbt_name *dest_name, - const char *dest_address, - int dest_port, + const struct nbt_peer_socket *dest, struct nbt_name *src_name, struct nbt_netlogon_packet *request) { @@ -52,7 +51,7 @@ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock, status = dgram_mailslot_send(dgmsock, DGRAM_DIRECT_UNIQUE, NBT_MAILSLOT_NETLOGON, - dest_name, dest_address, dest_port, + dest_name, dest, src_name, &blob); talloc_free(tmp_ctx); return status; @@ -71,6 +70,7 @@ NTSTATUS dgram_mailslot_netlogon_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_netlogon_packet); @@ -81,10 +81,12 @@ NTSTATUS dgram_mailslot_netlogon_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; |