s4:torture/rpc/spoolss.c: check for NT_STATUS_RPC_* instead of p->last_fault_code
authorStefan Metzmacher <metze@samba.org>
Mon, 12 Apr 2010 12:14:29 +0000 (14:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Apr 2010 07:34:06 +0000 (09:34 +0200)
metze

source4/torture/rpc/spoolss.c

index fb8760ef2b1cb0cc85288730697682364d95eee9..ec4cc78810c6ac1a99a8e98a085f666cbb145c6b 100644 (file)
@@ -3251,8 +3251,7 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
 
        status = dcerpc_spoolss_GetPrinterDataEx_r(b, tctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
-               if (NT_STATUS_EQUAL(status,NT_STATUS_NET_WRITE_FAULT) &&
-                   p->last_fault_code == DCERPC_FAULT_OP_RNG_ERROR) {
+               if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) {
                        torture_skip(tctx, "GetPrinterDataEx not supported by server\n");
                }
                torture_assert_ntstatus_ok(tctx, status, "GetPrinterDataEx failed");
@@ -4693,12 +4692,9 @@ static bool test_SecondaryClosePrinter(struct torture_context *tctx,
        cp.out.handle = handle;
 
        status = dcerpc_spoolss_ClosePrinter_r(p2->binding_handle, tctx, &cp);
-       torture_assert_ntstatus_equal(tctx, status, NT_STATUS_NET_WRITE_FAULT,
+       torture_assert_ntstatus_equal(tctx, status, NT_STATUS_RPC_SS_CONTEXT_MISMATCH,
                        "ERROR: Allowed close on secondary connection");
 
-       torture_assert_int_equal(tctx, p2->last_fault_code, DCERPC_FAULT_CONTEXT_MISMATCH,
-                                "Unexpected fault code");
-
        talloc_free(p2);
 
        return true;