1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4:torture/rpc/atsvc.c: make use of dcerpc_binding_handle stubs

metze
This commit is contained in:
Stefan Metzmacher 2010-03-15 10:49:02 +01:00
parent b8605cdd4e
commit b0ea3248a4

View File

@ -25,6 +25,7 @@
static bool test_JobGetInfo(struct dcerpc_pipe *p, struct torture_context *tctx, uint32_t job_id)
{
NTSTATUS status;
struct dcerpc_binding_handle *b = p->binding_handle;
struct atsvc_JobGetInfo r;
struct atsvc_JobInfo *info = talloc(tctx, struct atsvc_JobInfo);
if (!info) {
@ -35,7 +36,7 @@ static bool test_JobGetInfo(struct dcerpc_pipe *p, struct torture_context *tctx,
r.in.job_id = job_id;
r.out.job_info = &info;
status = dcerpc_atsvc_JobGetInfo(p, tctx, &r);
status = dcerpc_atsvc_JobGetInfo_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "JobGetInfo failed");
@ -46,13 +47,14 @@ static bool test_JobDel(struct dcerpc_pipe *p, struct torture_context *tctx, uin
uint32_t max_job_id)
{
NTSTATUS status;
struct dcerpc_binding_handle *b = p->binding_handle;
struct atsvc_JobDel r;
r.in.servername = dcerpc_server_name(p);
r.in.min_job_id = min_job_id;
r.in.max_job_id = max_job_id;
status = dcerpc_atsvc_JobDel(p, tctx, &r);
status = dcerpc_atsvc_JobDel_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "JobDel failed");
@ -62,6 +64,7 @@ static bool test_JobDel(struct dcerpc_pipe *p, struct torture_context *tctx, uin
static bool test_JobEnum(struct torture_context *tctx, struct dcerpc_pipe *p)
{
NTSTATUS status;
struct dcerpc_binding_handle *b = p->binding_handle;
struct atsvc_JobEnum r;
struct atsvc_enum_ctr ctr;
uint32_t resume_handle = 0, i, total_entries = 0;
@ -76,7 +79,7 @@ static bool test_JobEnum(struct torture_context *tctx, struct dcerpc_pipe *p)
r.in.resume_handle = r.out.resume_handle = &resume_handle;
r.out.total_entries = &total_entries;
status = dcerpc_atsvc_JobEnum(p, tctx, &r);
status = dcerpc_atsvc_JobEnum_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "JobEnum failed");
@ -92,6 +95,7 @@ static bool test_JobEnum(struct torture_context *tctx, struct dcerpc_pipe *p)
static bool test_JobAdd(struct torture_context *tctx, struct dcerpc_pipe *p)
{
NTSTATUS status;
struct dcerpc_binding_handle *b = p->binding_handle;
struct atsvc_JobAdd r;
struct atsvc_JobInfo info;
@ -103,7 +107,7 @@ static bool test_JobAdd(struct torture_context *tctx, struct dcerpc_pipe *p)
info.command = "foo.exe";
r.in.job_info = &info;
status = dcerpc_atsvc_JobAdd(p, tctx, &r);
status = dcerpc_atsvc_JobAdd_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "JobAdd failed");