s4:torture/rpc/echo.c: add explicit check for NTSTATUS r.out.result
authorStefan Metzmacher <metze@sernet.private>
Wed, 24 Mar 2010 08:31:17 +0000 (09:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 29 Mar 2010 13:35:43 +0000 (15:35 +0200)
metze

source4/torture/rpc/echo.c

index f33ec354789fd9bbaebd1b614a904bdfd498af9c..db0141c52195ee3539ccc638d4500c867140279f 100644 (file)
@@ -208,7 +208,6 @@ static bool test_testcall(struct torture_context *tctx,
 static bool test_testcall2(struct torture_context *tctx,
                                                  struct dcerpc_pipe *p)
 {
-       NTSTATUS status;
        struct echo_TestCall2 r;
        int i;
        struct dcerpc_binding_handle *b = p->binding_handle;
@@ -218,8 +217,9 @@ static bool test_testcall2(struct torture_context *tctx,
                r.out.info = talloc(tctx, union echo_Info);
 
                torture_comment(tctx, "Testing TestCall2 level %d\n", i);
-               status = dcerpc_echo_TestCall2_r(b, tctx, &r);
-               torture_assert_ntstatus_ok(tctx, status, "TestCall2 failed");
+               torture_assert_ntstatus_ok(tctx, dcerpc_echo_TestCall2_r(b, tctx, &r),
+                       "TestCall2 failed");
+               torture_assert_ntstatus_ok(tctx, r.out.result, "TestCall2 failed");
        }
        return true;
 }