commit 25a2d94974c7befd13f90e52b61e297c31ae52e9

simo idra at samba.org
Wed Sep 15 14:17:01 MDT 2010


On Wed, 2010-09-15 at 21:02 +0200, Björn Jacke wrote:
> On 2010-09-15 at 13:20 -0400 simo sent off:
> > On Wed, 2010-09-15 at 18:27 +0200, Björn JACKE wrote:
> > > +       if (timediff > lp_printcap_cache_time() ) {
> > > +               /* if refresh occurred more than
> > > lp_printcap_cache_time ago,
> > > +                * then we need to refresh */
> > > +               return true; 
> > 
> > Why did you change the semnatics to check for lp_printcap_cache_time() ?
> 
> isn't the printcap cache time exactly the timeout that we should use here? This
> is all about the printcap cache tdb - if printcap cache time is set to 30
> seconds the printcap (aka printer list) cache tdb should obviously also just be
> updated in that frequency, am I wrong?

lp_printcap_cache_time() is used at a higher level for the automatic
reload, I am not sure it is correct to check it here too. This function
is meant to avoid rapid firing refreshes but not to delay them for very
long times.

Unless you have checked that there are no side effects in changing the
semantics of this function I would just apply the time_mono() part of
the fix.

Simo.


-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list