summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-29 19:23:53 +0200
committerGünther Deschner <gd@samba.org>2010-04-30 01:25:41 +0200
commite85824d9170644493e839c1ac2a82f7bd8345994 (patch)
treeda4fbcc923a7e0bd5c28a58e4274357ff830e60e /source4/torture
parente13f2ed296f8f0432fb2f5035f724c4ad917f42c (diff)
downloadsamba-e85824d9170644493e839c1ac2a82f7bd8345994.tar.gz
samba-e85824d9170644493e839c1ac2a82f7bd8345994.tar.bz2
samba-e85824d9170644493e839c1ac2a82f7bd8345994.zip
s4-smbtorture: add rap_pull_rap_PrintQueue2.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rap/rap.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 442f0a0b48..d39a5c9b29 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -534,6 +534,24 @@ NTSTATUS smbcli_rap_netservergetinfo(struct smbcli_tree *tree,
return result;
}
+static NTSTATUS rap_pull_rap_JobInfo1(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintJobInfo1 *r)
+{
+ NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID));
+ NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->UserName, 21, sizeof(uint8_t), CH_DOS));
+ NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad));
+ NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->NotifyName, 16, sizeof(uint8_t), CH_DOS));
+ NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->DataType, 10, sizeof(uint8_t), CH_DOS));
+ RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintParameterString));
+ NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobPosition));
+ NDR_RETURN(ndr_pull_rap_PrintJStatusCode(ndr, NDR_SCALARS, &r->JobStatus));
+ RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobStatusString));
+ NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeSubmitted));
+ NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobSize));
+ RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobCommentString));
+
+ return NT_STATUS_OK;
+}
+
static NTSTATUS rap_pull_rap_PrintQueue0(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue0 *r)
{
NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintQName, 13, sizeof(uint8_t), CH_DOS));
@@ -559,6 +577,14 @@ static NTSTATUS rap_pull_rap_PrintQueue1(TALLOC_CTX *mem_ctx, struct ndr_pull *n
return NT_STATUS_OK;
}
+static NTSTATUS rap_pull_rap_PrintQueue2(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue2 *r)
+{
+ RAP_RETURN(rap_pull_rap_PrintQueue1(mem_ctx, ndr, convert, &r->queue));
+ RAP_RETURN(rap_pull_rap_JobInfo1(mem_ctx, ndr, convert, &r->job));
+
+ return NT_STATUS_OK;
+}
+
static NTSTATUS rap_pull_rap_PrintQueue3(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue3 *r)
{
RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintQueueName));
@@ -658,6 +684,9 @@ NTSTATUS smbcli_rap_netprintqenum(struct smbcli_tree *tree,
case 1:
result = rap_pull_rap_PrintQueue1(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info[i].info1);
break;
+ case 2:
+ result = rap_pull_rap_PrintQueue2(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info[i].info2);
+ break;
case 3:
result = rap_pull_rap_PrintQueue3(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info[i].info3);
break;
@@ -745,6 +774,9 @@ NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree,
case 1:
result = rap_pull_rap_PrintQueue1(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info.info1);
break;
+ case 2:
+ result = rap_pull_rap_PrintQueue2(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info.info2);
+ break;
case 3:
result = rap_pull_rap_PrintQueue3(mem_ctx, call->ndr_pull_data, r->out.convert, &r->out.info.info3);
break;