Ignoring printer errors

jra at dp.samba.org jra at dp.samba.org
Mon Feb 10 18:44:00 GMT 2003


On Mon, Feb 10, 2003 at 11:35:01PM +1100, Andrew Bartlett wrote:
> I'm wondering, why (in HEAD and 3.0)
> rpc_server/srv_spoolss_nt.c:_spoolss_enddocprinter_internal() doesn't
> handle any errors?
> 
> It sort of makes sense if we don't check the output of running the unix
> 'lpr' command (due to the separate thread of execution), but now we have
> back-ends like CUPS, that return real error codes - error codes that
> could well be used to give real meaning back to clients.
> 
> In particular, if you were to apply an ACL to a printer in CUPS,
> currently there is no way for that error (beside the dropped print job)
> to be handled properly.  The client just thinks the job spooled
> correctly.
> 
> It should not be that hard to do a proper mapping from CUPS error codes
> to the W_ERR or NT_STATUS equivalent.
> 
> Any reason why this hasn't been done, before I find myself knee-deep in
> printing?...  (or does anybody want to help me with the mapping?)

Don't change the printing code. You'll regret it :-) :-). I was
also thinking this morning in the shower of moving the error returns to full NTSTATUS
for all printing returns...

Give me a little time :-).

Jeremy.


More information about the samba-technical mailing list