mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Try and fix bug #7233 - print fails with jobs >4GB from Win7 clients.
Remove an arbitrarty 4G B limit that *doesn't need to be there* ! Jeremy.
This commit is contained in:
parent
e999472e36
commit
59545276f2
@ -2232,7 +2232,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
|
||||
ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size)
|
||||
{
|
||||
const char* sharename = lp_const_servicename(snum);
|
||||
int return_code;
|
||||
ssize_t return_code;
|
||||
struct printjob *pjob;
|
||||
|
||||
pjob = print_job_find(sharename, jobid);
|
||||
|
@ -5288,7 +5288,7 @@ WERROR _spoolss_EndDocPrinter(pipes_struct *p,
|
||||
WERROR _spoolss_WritePrinter(pipes_struct *p,
|
||||
struct spoolss_WritePrinter *r)
|
||||
{
|
||||
uint32_t buffer_written;
|
||||
ssize_t buffer_written;
|
||||
int snum;
|
||||
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
|
||||
|
||||
@ -5302,11 +5302,11 @@ WERROR _spoolss_WritePrinter(pipes_struct *p,
|
||||
if (!get_printer_snum(p, r->in.handle, &snum, NULL))
|
||||
return WERR_BADFID;
|
||||
|
||||
buffer_written = (uint32_t)print_job_write(snum, Printer->jobid,
|
||||
buffer_written = print_job_write(snum, Printer->jobid,
|
||||
(const char *)r->in.data.data,
|
||||
(SMB_OFF_T)-1,
|
||||
(size_t)r->in._data_size);
|
||||
if (buffer_written == (uint32_t)-1) {
|
||||
if (buffer_written == (ssize_t)-1) {
|
||||
*r->out.num_written = 0;
|
||||
if (errno == ENOSPC)
|
||||
return WERR_NO_SPOOL_SPACE;
|
||||
|
Loading…
Reference in New Issue
Block a user