diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-12 21:31:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:17 -0500 |
commit | f0105b7fcdc3032d22444a1973927fff2dd9a06f (patch) | |
tree | 3208eb30454778583bbf18602f8b916a20c0f294 /source/torture/nbt/winsreplication.c | |
parent | 049100bb9b2e39e20b79247f5111f86a9ca4118b (diff) | |
download | samba-f0105b7fcdc3032d22444a1973927fff2dd9a06f.tar.gz |
r12200: - move the the winsreplication client and server code to the packet_context
system
- this needs to be in one big patch, because of the merging code,
that changes client in server connections and the other way around
- use socket_connect_send/_recv() in the client code
metze
Diffstat (limited to 'source/torture/nbt/winsreplication.c')
-rw-r--r-- | source/torture/nbt/winsreplication.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/torture/nbt/winsreplication.c b/source/torture/nbt/winsreplication.c index 3767722e35b..578fff1c5af 100644 --- a/source/torture/nbt/winsreplication.c +++ b/source/torture/nbt/winsreplication.c @@ -103,6 +103,8 @@ static BOOL test_assoc_ctx1(TALLOC_CTX *mem_ctx, const char *address) struct wrepl_socket *wrepl_socket2; struct wrepl_associate associate2; struct wrepl_pull_table pull_table; + struct wrepl_packet packet; + struct wrepl_send_ctrl ctrl; struct wrepl_packet *rep_packet; struct wrepl_associate_stop assoc_stop; NTSTATUS status; @@ -137,9 +139,14 @@ static BOOL test_assoc_ctx1(TALLOC_CTX *mem_ctx, const char *address) printf("association context (conn2): 0x%x\n", associate2.out.assoc_ctx); printf("Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n"); - pull_table.in.assoc_ctx = associate1.out.assoc_ctx; - req = wrepl_pull_table_send(wrepl_socket2, &pull_table); - req->send_only = True; + ZERO_STRUCT(packet); + packet.opcode = WREPL_OPCODE_BITS; + packet.assoc_ctx = associate1.out.assoc_ctx; + packet.mess_type = WREPL_REPLICATION; + packet.message.replication.command = WREPL_REPL_TABLE_QUERY; + ZERO_STRUCT(ctrl); + ctrl.send_only = True; + req = wrepl_request_send(wrepl_socket2, &packet, &ctrl); status = wrepl_request_recv(req, mem_ctx, &rep_packet); CHECK_STATUS(status, NT_STATUS_OK); @@ -281,7 +288,7 @@ static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address) packet.mess_type = WREPL_STOP_ASSOCIATION; packet.message.stop.reason = 0; - req = wrepl_request_send(wrepl_socket, &packet); + req = wrepl_request_send(wrepl_socket, &packet, NULL); talloc_free(req); printf("failed - We are not a valid pull partner for the server\n"); |