summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-10 17:46:09 -0800
committerJeremy Allison <jra@samba.org>2010-03-10 17:46:09 -0800
commit59545276f2bd6df8ee5e75e96e707fd86ff44350 (patch)
tree56529a137ab4b73c467b0624bc189a9014177246
parente999472e36076e432187371b0853b887effe1067 (diff)
downloadsamba-59545276f2bd6df8ee5e75e96e707fd86ff44350.tar.gz
samba-59545276f2bd6df8ee5e75e96e707fd86ff44350.tar.bz2
samba-59545276f2bd6df8ee5e75e96e707fd86ff44350.zip
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.
-rw-r--r--source3/printing/printing.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 50494e37dc..e48a2d173c 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -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);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index b70376f52a..a35c5f6382 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -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;