summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-30 11:57:14 +0200
committerGünther Deschner <gd@samba.org>2010-04-30 13:44:41 +0200
commit7f1775e8604b405d89b578b0f04081c8273c7217 (patch)
tree029c4852a396ec9f5454b0caf0753b6f596fa6f8 /source4/torture
parent3b3e19724cf178c916c6868c82f097000b79a1e2 (diff)
downloadsamba-7f1775e8604b405d89b578b0f04081c8273c7217.tar.gz
samba-7f1775e8604b405d89b578b0f04081c8273c7217.tar.bz2
samba-7f1775e8604b405d89b578b0f04081c8273c7217.zip
s4-smbtorture: add smbcli_rap_netprintqueuepause().
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rap/rap.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 739d44e518..004d01daaf 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -952,6 +952,43 @@ NTSTATUS smbcli_rap_netprintjobdelete(struct smbcli_tree *tree,
return result;
}
+NTSTATUS smbcli_rap_netprintqueuepause(struct smbcli_tree *tree,
+ struct smb_iconv_convenience *iconv_convenience,
+ TALLOC_CTX *mem_ctx,
+ struct rap_NetPrintQueuePause *r)
+{
+ struct rap_call *call;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQPause))) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ rap_cli_push_string(call, r->in.PrintQueueName);
+
+ rap_cli_expect_format(call, "");
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_NetPrintQueuePause, r);
+ }
+
+ result = rap_cli_do_call(tree, iconv_convenience, call);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.status));
+ NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.convert));
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_NetPrintQueuePause, r);
+ }
+
+ done:
+ talloc_free(call);
+ return result;
+}
+
static bool test_netservergetinfo(struct torture_context *tctx,
struct smbcli_state *cli)
{