mirror of
https://github.com/samba-team/samba.git
synced 2025-12-11 08: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:
@@ -850,7 +850,7 @@ static void store_queue_struct(struct tdb_print_db *pdb, struct traverse_struct
|
|||||||
size_t i;
|
size_t i;
|
||||||
uint qcount;
|
uint qcount;
|
||||||
|
|
||||||
if (max_reported_jobs < pts->qcount)
|
if (max_reported_jobs && (max_reported_jobs < pts->qcount))
|
||||||
pts->qcount = max_reported_jobs;
|
pts->qcount = max_reported_jobs;
|
||||||
qcount = pts->qcount;
|
qcount = pts->qcount;
|
||||||
|
|
||||||
@@ -2147,7 +2147,7 @@ static BOOL get_stored_queue_info(struct tdb_print_db *pdb, int snum, int *pcoun
|
|||||||
len = 0;
|
len = 0;
|
||||||
for( i = 0; i < qcount; i++) {
|
for( i = 0; i < qcount; i++) {
|
||||||
uint32 qjob, qsize, qpage_count, qstatus, qpriority, qtime;
|
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,
|
&qjob,
|
||||||
&qsize,
|
&qsize,
|
||||||
&qpage_count,
|
&qpage_count,
|
||||||
|
|||||||
@@ -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))
|
if (!prs_unistr("valuename", ps, depth, &ctr->values[i].valuename))
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
if (UNMARSHALLING(ps) && ctr->values[i].data_len) {
|
if ( ctr->values[i].data_len ) {
|
||||||
|
if ( UNMARSHALLING(ps) ) {
|
||||||
ctr->values[i].data = (uint8 *)prs_alloc_mem(
|
ctr->values[i].data = (uint8 *)prs_alloc_mem(
|
||||||
ps, ctr->values[i].data_len);
|
ps, ctr->values[i].data_len);
|
||||||
if (!ctr->values[i].data)
|
if (!ctr->values[i].data)
|
||||||
return False;
|
return False;
|
||||||
|
}
|
||||||
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
|
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user