changeset 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 3598fc9581c1
children ffb8a4a91218
files ChangeLog src/noffle.c
diffstat 2 files changed, 38 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 09 22:30:58 2000 +0100
+++ b/ChangeLog	Mon Aug 14 20:49:56 2000 +0100
@@ -2,6 +2,11 @@
 NOFFLE ChangeLog
 -------------------------------------------------------------------------------
 
+Fri Aug 11 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+
+ * src/noffle.c: Minor bug fix. Noffle no longer tries to unsubscribe groups
+   that are already unsubscribed.
+
 Wed Aug  9 22:02:21 BST 2000 Jim Hague <jim.hague@acm.org>
 
  * src/client.c: Use plain LIST instead of LIST ACTIVE if possible
@@ -12,6 +17,14 @@
    noffle.conf.example: Add first-cut article filtering. Note you will
    need to run 'configure' again to re-generate src/Makefile.
 	
+Wed Jul 26 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+
+ * Released version 1.0pre7
+
+Tue Jul 25 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+
+ * src/client.c: Added GMT to NEWGROUPS command.
+
 Mon 24 Jul 20:30:05 BST 2000 Jim Hague <jim.hague@acm.org>
 
  * src/database.h,src/database.c,src/server.c: Redo XHDR and
@@ -45,11 +58,17 @@
    with a network operation is in progress. I may carry on and extend this
    to all server operations as well (so a slow client can't hog the lock).
 	
-Sat Jun 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+Sat Jul 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
 
  * doc/NOTES: Removed section about GNUS hanging. It was caused
    by the "select" bug in Noffle.
 
+Sat Jul 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+
+ * src/server.c, src/protocol.c: Fixed a critical bug. "select" cannot
+   be used with buffered stdio. This caused Noffle to hang with some
+   readers (like tin).
+	
 Sat Jul 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de> 
 
  * request.c: Applied patch from M.Nalis:
@@ -73,6 +92,11 @@
    creation on local server.
  * src/group.h,src/group.c: Remove Grp_setCreated().
 	
+Fri Jul 14 2000 Matija Nalis <mnalis-sf@voyager.hr>
+
+ * Added counter for --fetch so one can see how much it is until the
+   end of the transfer.
+
 Fri Jul 14 15:20:14 BST 2000 Jim Hague <jim.hague@acm.org>
 
  * src/client.c,src/fetch.c,src/noffle.c: The groupinfo.lastupdate file
@@ -94,11 +118,6 @@
    require 'noffle --query groups' to be re-run to create the server
    lastupdate.<server> files.
 
-Fri Jul 14 2000 Matija Nalis <mnalis-sf@voyager.hr>
-
- * Added counter for --fetch so one can see how much it is until the
-   end of the transfer.
-
 Mon Jul 03 12:05:50 BST 2000 Jim Hague <jim.hague@acm.org>
 
  * src/database.h,src/database.c,src/server.c: Fix 'XHDR <msgId>' and
@@ -111,7 +130,7 @@
   * src/server.c: Leave online mode, if the connection to a remote server
     fails for avoiding a series of timeouts and holding the lock for
     a long time.
-	
+
 Sun Jun 25 09:45:50 BST 2000 Jim Hague <jim.hague@acm.org>
 
  * src/protocol.c: Another go at Prt_genMsgId. Yesterday I seeded the
@@ -140,6 +159,11 @@
 
 Sat Jun 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
 
+ * doc/NOTES: Removed section about GNUS hanging. It was caused
+   by the "select" bug in Noffle.
+
+Sat Jun 22 2000 Markus Enzenberger <markus.enzenberger@t-online.de>
+
  * src/server.c, src/protocol.c: Fixed a critical bug. "select" cannot
    be used with buffered stdio. This caused Noffle to hang with some
    readers (like tin).
--- 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