s4-smbtorture: share test_ClosePrinter between RPC-SPOOLSS and RPC-SPOOLSS-WIN.
authorGünther Deschner <gd@samba.org>
Fri, 4 Jun 2010 17:02:17 +0000 (19:02 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 4 Jun 2010 22:35:09 +0000 (00:35 +0200)
Guenther

source4/torture/rpc/spoolss.c
source4/torture/rpc/spoolss_win.c

index 7154b838f3b34db92b495b66bb695e15d61b038a..e61adfec835245a7fd87e6fdde89654d92c700da 100644 (file)
@@ -2185,10 +2185,6 @@ static bool call_OpenPrinterEx(struct torture_context *tctx,
                               struct spoolss_DeviceMode *devmode,
                               struct policy_handle *handle);
 
-static bool test_ClosePrinter(struct torture_context *tctx,
-                             struct dcerpc_binding_handle *b,
-                             struct policy_handle *handle);
-
 static bool test_PrinterInfo_DevModes(struct torture_context *tctx,
                                      struct dcerpc_pipe *p,
                                      struct policy_handle *handle,
@@ -2373,9 +2369,9 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
        return ret;
 }
 
-static bool test_ClosePrinter(struct torture_context *tctx,
-                             struct dcerpc_binding_handle *b,
-                             struct policy_handle *handle)
+bool test_ClosePrinter(struct torture_context *tctx,
+                      struct dcerpc_binding_handle *b,
+                      struct policy_handle *handle)
 {
        NTSTATUS status;
        struct spoolss_ClosePrinter r;
index 384dda39388921cac4353e38e7ab7f666a420761..b0586e1586eb2a4e76716fcfed287a72089933e9 100644 (file)
@@ -116,9 +116,6 @@ static bool test_OpenPrinterAsAdmin(struct torture_context *tctx,
 }
 
 
-static bool test_ClosePrinter(struct torture_context *tctx,
-                               struct dcerpc_binding_handle *b,
-                               struct policy_handle *handle);
 
 /* This replicates the opening sequence of OpenPrinterEx calls XP does */
 static bool test_OpenPrinterSequence(struct torture_context *tctx,
@@ -453,22 +450,6 @@ static bool test_EnumPrinterDataEx(struct torture_context *tctx,
        return true;
 }
 
-static bool test_ClosePrinter(struct torture_context *tctx,
-                               struct dcerpc_binding_handle *b,
-                               struct policy_handle *handle)
-{
-       NTSTATUS status;
-       struct spoolss_ClosePrinter cp;
-
-       cp.in.handle  = handle;
-       cp.out.handle = handle;
-
-       status = dcerpc_spoolss_ClosePrinter_r(b, tctx, &cp);
-       torture_assert_ntstatus_ok(tctx, status, "ClosePrinter failed");
-
-       return true;
-}
-
 static bool test_WinXP(struct torture_context *tctx, struct dcerpc_pipe *p)
 {
        bool ret = true;