summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-11-13 20:16:28 +0000
committerGerald Carter <jerry@samba.org>2003-11-13 20:16:28 +0000
commitac20c8cfb0e3633f5007fe30fe82704264db5c00 (patch)
tree927ebe930a3b6cc25c490ea111cb194c1d80dc7a /source3/rpc_parse
parent618d7dd0c77cc125611e97d60d6759fb0a0ccb5c (diff)
downloadsamba-ac20c8cfb0e3633f5007fe30fe82704264db5c00.tar.gz
samba-ac20c8cfb0e3633f5007fe30fe82704264db5c00.tar.bz2
samba-ac20c8cfb0e3633f5007fe30fe82704264db5c00.zip
* Fix from SATOH Fumiyasu for bug 660 (failing to view print
jobs) by only enforce the 'max reported print jobs' parameter when it is non-zero. * Fixed bug 338 by making sure that data values are written out when we are marshalling an EnumPrinterDataEx() reply. This probably fixes other bugs reported against point-n-print feature in 3.0.0 (This used to be commit d7026f6d178f6ed531bbf7d681d4efde0828616c)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 65f16414a0..7581316767 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -7294,11 +7294,13 @@ static BOOL spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps,
if (!prs_unistr("valuename", ps, depth, &ctr->values[i].valuename))
return False;
- if (UNMARSHALLING(ps) && ctr->values[i].data_len) {
- ctr->values[i].data = (uint8 *)prs_alloc_mem(
- ps, ctr->values[i].data_len);
- if (!ctr->values[i].data)
- return False;
+ if ( ctr->values[i].data_len ) {
+ if ( UNMARSHALLING(ps) ) {
+ ctr->values[i].data = (uint8 *)prs_alloc_mem(
+ ps, ctr->values[i].data_len);
+ if (!ctr->values[i].data)
+ return False;
+ }
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
return False;
}