3.0.25 cups printer location string sync
Martin Zielinski
mz at seh.de
Tue May 15 12:40:39 GMT 2007
Hello all!
I still don't like the way how the printer location string is grabbed
from cups in get_a_printer_2() and get_a_printer_2_default() functions.
The reason is, if the comment or location is empty, then samba will
allways ask cups. This can happen *very* frequently when clients are
connected to printer shares.
Another point is, that in get_printer_2_default() the comment string is
allways empty. So the if-clause is unnecessary.
The cups-calls might not be such a big problem on large servers, but
nonetheless it's a slow-down by design (if I havn't overlooked something
obvious).
I'd suggest to add the location to the service structure and the
pcap_cache structure. Then the location can be loaded at startup just
like the comment string (not overwriting the tdb-value if set).
2ndly, in this case the user cannot update the string from the server
(linux or so) side. So I would suggest to expand the rpcclient
"setprinter" call (setprinter printername comment [location]).
I'm not sure about the next thing, but if I update the printer comment
and/or location string and do an AD search for printers afterwards, the
new strings are not visible in the result. I don't know, if there are
timeouts or sync intervals. If not, the printer should be "republished"
after the changes have been made.
If anyone is interested, I could provide a patch against 3.0.25.
Best regards,
Martin
--
Martin Zielinski mz at seh.de
Software Development
SEH Computertechnik GmbH www.seh.de
More information about the samba-technical
mailing list