diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-05-04 02:51:12 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-27 10:27:13 -0400 |
commit | 660506d359d76700f6f6ae5b7e9c4d05fe505fb6 (patch) | |
tree | e9b93712fe3d2dad8ddf412039892b0e55c08c5a /source3/rpc_server | |
parent | 94ee35f9cc0880c267bee14047d559948eb14ede (diff) | |
download | samba-660506d359d76700f6f6ae5b7e9c4d05fe505fb6.tar.gz samba-660506d359d76700f6f6ae5b7e9c4d05fe505fb6.tar.bz2 samba-660506d359d76700f6f6ae5b7e9c4d05fe505fb6.zip |
s3-printing: Handled case when smbd spools a file on behalf of spoolss.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 24d1716d42..1f0b36450f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5188,6 +5188,7 @@ WERROR _spoolss_EndDocPrinter(pipes_struct *p, struct spoolss_EndDocPrinter *r) { Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle); + NTSTATUS status; int snum; if (!Printer) { @@ -5201,11 +5202,15 @@ WERROR _spoolss_EndDocPrinter(pipes_struct *p, } Printer->document_started = false; - print_job_end(snum, Printer->jobid, NORMAL_CLOSE); - /* error codes unhandled so far ... */ + status = print_job_end(snum, Printer->jobid, NORMAL_CLOSE); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(2, ("_spoolss_EndDocPrinter: " + "print_job_end failed [%s]\n", + nt_errstr(status))); + } Printer->jobid = 0; - return WERR_OK; + return ntstatus_to_werror(status); } /**************************************************************** |