1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-26 04:23:49 +03:00

* 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 fd98af75d6)
This commit is contained in:
Gerald Carter
2003-11-13 20:15:17 +00:00
parent 5fd6b5bc61
commit 281e293331
2 changed files with 9 additions and 7 deletions

View File

@@ -850,7 +850,7 @@ static void store_queue_struct(struct tdb_print_db *pdb, struct traverse_struct
size_t i;
uint qcount;
if (max_reported_jobs < pts->qcount)
if (max_reported_jobs && (max_reported_jobs < pts->qcount))
pts->qcount = max_reported_jobs;
qcount = pts->qcount;
@@ -2147,7 +2147,7 @@ static BOOL get_stored_queue_info(struct tdb_print_db *pdb, int snum, int *pcoun
len = 0;
for( i = 0; i < qcount; i++) {
uint32 qjob, qsize, qpage_count, qstatus, qpriority, qtime;
len += tdb_unpack(data.dptr + 4 + len, data.dsize - len, NULL, "ddddddff",
len += tdb_unpack(data.dptr + 4 + len, data.dsize - len, "ddddddff",
&qjob,
&qsize,
&qpage_count,

View File

@@ -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;
}