summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-02-18 17:24:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:46 -0500
commit2908e5837c6f68dea56bbb96b359c5600102440b (patch)
treefe5fa0fa99ec9b68561b61c0ba0025f7c13b9cd6 /source4/librpc
parent00da7414d7fc09e5e6715c400d939534a926b8b3 (diff)
downloadsamba-2908e5837c6f68dea56bbb96b359c5600102440b.tar.gz
samba-2908e5837c6f68dea56bbb96b359c5600102440b.tar.bz2
samba-2908e5837c6f68dea56bbb96b359c5600102440b.zip
r5446: fix pulling of arrays in EnumXXX functions
metze (This used to be commit 0aea8522d7ddaf1ce4cc708c13888e44d14cda32)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index 0e51533941..e481503ccf 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -56,6 +56,8 @@ NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NDR_ALLOC_N(ndr, *info, count);
for (i=0;i<count;i++) {
+ ndr->data += ndr->offset;
+ ndr->offset = 0;
NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, level, &(*info)[i]));
}
return NT_STATUS_OK;
@@ -73,6 +75,8 @@ NTSTATUS pull_spoolss_JobInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NDR_ALLOC_N(ndr, *info, count);
for (i=0;i<count;i++) {
+ ndr->data += ndr->offset;
+ ndr->offset = 0;
NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, level, &(*info)[i]));
}
return NT_STATUS_OK;
@@ -90,6 +94,8 @@ NTSTATUS pull_spoolss_DriverInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NDR_ALLOC_N(ndr, *info, count);
for (i=0;i<count;i++) {
+ ndr->data += ndr->offset;
+ ndr->offset = 0;
NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr, NDR_SCALARS|NDR_BUFFERS, level, &(*info)[i]));
}
return NT_STATUS_OK;