summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-01-31 20:31:00 +0100
committerGünther Deschner <gd@samba.org>2010-01-31 20:59:56 +0100
commit0c6aae4d53488738d2180947a31c6373bf6ec81d (patch)
treeb8088fa82e813a507723ea009345897308e79d00 /source4/torture/rpc
parent377abba0e9c2a62c7f59191a843ae81104e7b1ba (diff)
downloadsamba-0c6aae4d53488738d2180947a31c6373bf6ec81d.tar.gz
samba-0c6aae4d53488738d2180947a31c6373bf6ec81d.tar.bz2
samba-0c6aae4d53488738d2180947a31c6373bf6ec81d.zip
s4-smbtorture: also test RouterRefreshPrinterChangeNotify call in RPC-SPOOLSS-NOTIFY.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss_notify.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index 1e441f9ac2..dc324861d0 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -292,6 +292,29 @@ static bool test_RemoteFindFirstPrinterChangeNotifyEx(struct torture_context *tc
return true;
}
+static bool test_RouterRefreshPrinterChangeNotify(struct torture_context *tctx,
+ struct dcerpc_pipe *p,
+ struct policy_handle *handle,
+ struct spoolss_NotifyOption *options)
+{
+ struct spoolss_RouterRefreshPrinterChangeNotify r;
+ struct spoolss_NotifyInfo *info;
+
+ torture_comment(tctx, "Testing RouterRefreshPrinterChangeNotify\n");
+
+ r.in.handle = handle;
+ r.in.change_low = 0;
+ r.in.options = options;
+ r.out.info = &info;
+
+ torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_RouterRefreshPrinterChangeNotify(p, tctx, &r),
+ "RouterRefreshPrinterChangeNotify failed");
+ torture_assert_werr_ok(tctx, r.out.result,
+ "error return code for RouterRefreshPrinterChangeNotify");
+
+ return true;
+}
+
static bool test_ClosePrinter(struct torture_context *tctx,
struct dcerpc_pipe *p,
struct policy_handle *handle)
@@ -391,6 +414,8 @@ static bool test_RFFPCNEx(struct torture_context *tctx,
torture_assert(tctx, received_packets, "no packets received");
torture_assert_int_equal(tctx, received_packets->opnum, NDR_SPOOLSS_REPLYOPENPRINTER,
"no ReplyOpenPrinter packet after RemoteFindFirstPrinterChangeNotifyEx");
+ torture_assert(tctx, test_RouterRefreshPrinterChangeNotify(tctx, p, &handle, NULL), "");
+ torture_assert(tctx, test_RouterRefreshPrinterChangeNotify(tctx, p, &handle, server_option), "");
torture_assert(tctx, test_ClosePrinter(tctx, p, &handle), "");
tmp = last_packet(received_packets);
torture_assert_int_equal(tctx, tmp->opnum, NDR_SPOOLSS_REPLYCLOSEPRINTER,