Mercurial > noffle
diff src/noffle.c @ 132:a740dac296bc noffle
[svn] Fix repeated auto-unsubscribe bug & sync to 1.0pre7
author | bears |
---|---|
date | Mon, 14 Aug 2000 20:49:56 +0100 |
parents | 3c71e28c8eef |
children | 1c7303c71f66 |
line wrap: on
line diff
--- a/src/noffle.c Wed Aug 09 22:30:58 2000 +0100 +++ b/src/noffle.c Mon Aug 14 20:49:56 2000 +0100 @@ -10,7 +10,7 @@ received for some seconds (to allow multiple clients connect at the same time). - $Id: noffle.c 183 2000-07-25 12:14:54Z bears $ + $Id: noffle.c 197 2000-08-14 19:49:56Z bears $ */ #if HAVE_CONFIG_H @@ -47,9 +47,6 @@ #include "lock.h" #include "portable.h" -static void -doUnsubscribe( const char *name ); - struct Noffle { Bool queryGrps; @@ -246,6 +243,7 @@ if ( ! Cont_firstGrp( grp ) ) return; Log_inf( "Expiring overviews not in database" ); + Fetchlist_read(); do { if ( ! Grp_exists( grp ) ) @@ -267,14 +265,16 @@ ++cntLeft; } if ( ! Grp_local( grp ) - && autoUnsubscribe + && Fetchlist_contains( grp ) + && autoUnsubscribe && difftime( now, Grp_lastAccess( grp ) ) > maxAge ) { Log_ntc( "Auto-unsubscribing from %s after %d " "days without access", grp, autoUnsubscribeDays ); Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays ); - doUnsubscribe( grp ); + Fetchlist_remove( grp ); + Grp_setRmtNext( grp, GRP_RMT_NEXT_NOT_SUBSCRIBED ); } Cont_write(); Grp_setFirstLast( grp, Cont_first(), Cont_last() ); @@ -283,6 +283,7 @@ } } while ( Cont_nextGrp( grp ) ); + Fetchlist_write(); } static void