summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-05 19:32:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:45 -0500
commit3ad849db21c7ba7171f3980629de031d5c8adc95 (patch)
treec5844be7f7fb46f2ef2c7177412d833ae751b82d /source3
parent317d00514245097557c3c20c17e64d2d6a7f6aad (diff)
downloadsamba-3ad849db21c7ba7171f3980629de031d5c8adc95.tar.gz
samba-3ad849db21c7ba7171f3980629de031d5c8adc95.tar.bz2
samba-3ad849db21c7ba7171f3980629de031d5c8adc95.zip
r21164: Fix from Martin Zielinski <mz@seh.de> for EnumprinterdataEX
on Vista. Jeremy. (This used to be commit b16707a8615e1d00839d31e7a3061fb111336691)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d0a754f281..48b34755a6 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9521,6 +9521,15 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
/* housekeeping information in the reply */
+ /* Fix from Martin Zielinski <mz@seh.de> - ensure
+ * the hand marshalled container size is a multiple
+ * of 4 bytes for RPC alignment.
+ */
+
+ if (needed % 4) {
+ needed += 4-(needed % 4);
+ }
+
r_u->needed = needed;
r_u->returned = num_entries;
@@ -9533,15 +9542,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
r_u->ctr.size = r_u->needed;
- /* Fix from Martin Zielinski <mz@seh.de> - ensure
- * the hand marshalled container size is a multiple
- * of 4 bytes for RPC alignment.
- */
-
- if (needed % 4) {
- r_u->ctr.size += 4-(needed % 4);
- }
-
r_u->ctr.size_of_array = r_u->returned;
r_u->ctr.values = enum_values;