Bug 2333 - "printer name" is not honored in printing.c
"printer name" is not honored in printing.c
Product: Samba 3.0
Classification: Unclassified
Component: Printing
All Windows XP
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2005-02-11 09:30 UTC by Christoph Klein
Modified: 2005-08-24 10:23 UTC (History)
0 users

See Also:

patch against 3.0.11 to opverload the lpq command to pass in the printername to cups_queue_get() (2.74 KB, patch)
2005-02-12 07:38 UTC, Gerald (Jerry) Carter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Klein 2005-02-11 09:30:46 UTC
It seems like in some new versions of samba, the printer name attribute from a
printer share is no longer honored in printing.c while updating the printer
queue and the printer state. The function seems to assume that the printer name
is the same as the servicename.

Comment 1 Gerald (Jerry) Carter 2005-02-11 11:23:20 UTC
do you mean the 'printer name' smb.conf option?  That is only 
for setting the %p printing variable.  Can you give some more 
details of you problem including the lines in the code you are 
referring to ?

Also, I would recommend looking (and testing) 3.0.11 as it 
has some critical printing bug fixes incorporated in it.
Comment 2 Christoph Klein 2005-02-11 16:04:44 UTC
yes i mean the "printer name" option. we have several printer shares on our
server who point to a  single cups queue. Job submitting works fine. But you
can't see the queued jobs on this cups printer. In the log.smbd file there are a
lot of errors from the cups printing backend, that the staus of the queued jobs
couldnt be retrieved. "Unable to get jobs for <url>"
 This happens because the url used to retrieve the data is as follows
"ipp://localhost/printers/<printerqueue>", and <printerqueue> is not replaced by
the printer name configured in smb.conf, but by the sharename that is unknown to
cups. All other functions of the interface printif get snum as an argument, and
the cups backend replaces this with the "printer name" from smb.conf. Only
queue_get gets the sharename as argument, and in printing.c the sharename is not
replaced by the printername if one was defined in smb.conf.
Comment 3 Gerald (Jerry) Carter 2005-02-12 07:38:36 UTC
Created attachment 964 [details]
patch against 3.0.11 to opverload the lpq command to pass in the printername to cups_queue_get()
Comment 4 Gerald (Jerry) Carter 2005-02-12 07:41:10 UTC
nice diagnosis.  Please test this patch.  Note that it
sets the default lpq command for cups printers to be '%p'
and we use the lpq_command variable to pass in the 
printer name.  This is basically how we do it for other 
printing backends such as lprng.

Thanks for the bug report.  It was very helpful.
Comment 5 Gerald (Jerry) Carter 2005-08-24 10:23:57 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.