diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-05-04 04:28:48 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-27 10:27:13 -0400 |
commit | 849cc65654d20e7077621ead2429a82fcac35197 (patch) | |
tree | 0d6c07cfd5113b8f1d5bf809e17ad1303d9b3edc /source3/smbd/fileio.c | |
parent | 660506d359d76700f6f6ae5b7e9c4d05fe505fb6 (diff) | |
download | samba-849cc65654d20e7077621ead2429a82fcac35197.tar.gz samba-849cc65654d20e7077621ead2429a82fcac35197.tar.bz2 samba-849cc65654d20e7077621ead2429a82fcac35197.zip |
s3-smbd: Migrated to new spoolss functions for printing.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r-- | source3/smbd/fileio.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index f9fcc1be50..e5a288822e 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "printing.h" #include "smbd/globals.h" static bool setup_write_cache(files_struct *, SMB_OFF_T); @@ -291,20 +292,15 @@ ssize_t write_file(struct smb_request *req, int write_path = -1; if (fsp->print_file) { - uint32 jobid; + uint32_t t; + int ret; - if (!rap_to_pjobid(fsp->print_file->rap_jobid, NULL, &jobid)) { - DEBUG(3, ("write_file: " - "Unable to map RAP jobid %u to jobid.\n", - (unsigned int)fsp->print_file->rap_jobid)); - errno = EBADF; + ret = print_spool_write(fsp, data, n, pos, &t); + if (ret) { + errno = ret; return -1; } - - /* support seeks for print files bigger than 4G */ - pos = printfile_offset(fsp, pos); - - return print_job_write(SNUM(fsp->conn), jobid, data, pos, n); + return t; } if (!fsp->can_write) { |