summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-05 14:34:36 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-07 16:52:34 +0100
commitfc41e4791f3a59cd391d63ebc155407ea4787bae (patch)
tree422139166f6a3a7da6a9aeb86377538cada876c4
parent6dfc96c329421979e7367ceee3a65633e4738472 (diff)
downloadsamba-fc41e4791f3a59cd391d63ebc155407ea4787bae.tar.gz
samba-fc41e4791f3a59cd391d63ebc155407ea4787bae.tar.bz2
samba-fc41e4791f3a59cd391d63ebc155407ea4787bae.zip
s4:torture/nbt: use wrepl_associate_stop() instead of build the request by hand
metze
-rw-r--r--source4/torture/nbt/winsreplication.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 1d08c4f849..1655135a33 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -274,17 +274,12 @@ static bool test_wins_replication(struct torture_context *tctx)
status = wrepl_pull_table(wrepl_socket, tctx, &pull_table);
if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
- struct wrepl_packet packet;
- struct wrepl_request *req;
+ struct wrepl_associate_stop assoc_stop;
- ZERO_STRUCT(packet);
- packet.opcode = WREPL_OPCODE_BITS;
- packet.assoc_ctx = associate.out.assoc_ctx;
- packet.mess_type = WREPL_STOP_ASSOCIATION;
- packet.message.stop.reason = 0;
+ assoc_stop.in.assoc_ctx = associate.out.assoc_ctx;
+ assoc_stop.in.reason = 0;
- req = wrepl_request_send(wrepl_socket, &packet, NULL);
- talloc_free(req);
+ wrepl_associate_stop(wrepl_socket, &assoc_stop);
torture_fail(tctx, "We are not a valid pull partner for the server");
}