'printcap cache time' option proposal; fix for bug #1259

Lars MÜLLER lmuelle at SuSE.de
Fri May 7 17:18:21 GMT 2004


I suggest to add an additional timer to check_reload() of smbd/process.c
to trigger a rescan of the printing subsystem.  Thereby we would detect
new printers and remove stale.

This needs a remove_stale_printers() function in smbd/service.d which
checks if a print service is no longer available in the printing
subsystem.  In this case we could savely lp_killservice() this service.

In remove_stale_printers() we take care not to remove the PRINTERS_NAME

After we've removed stale printers a load_printers() call adds missing

The default value for printcap cache time is 750 seconds.  A value of
zero disables the feature.

I've tested this feature with CUPS a printing system and Samba 3.0.3.

The patch is available as attachment #1 of bugzilla.Samba.org bug #1259.
See https://bugzilla.samba.org/attachment.cgi?id=498&action=view

Lars Müller [ˈlaː(r)z ˈmʏlɐ]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040507/51b6e83f/attachment.bin

More information about the samba-technical mailing list