From 281e293331f20d9341ebaf555f10ef339952048c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 13 Nov 2003 20:15:17 +0000 Subject: * 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 fd98af75d655449a677360f6991da5caabc88b4d) --- source3/rpc_parse/parse_spoolss.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/rpc_parse/parse_spoolss.c') 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; } -- cgit