diff src/noffle.c @ 102:38b0a1532a37 noffle

[svn] Only track remote message no when subscribed
author bears
date Mon, 05 Jun 2000 09:57:05 +0100
parents 0428aed4f9d0
children af7bea7515b2
line wrap: on
line diff
--- a/src/noffle.c	Mon May 29 17:35:01 2000 +0100
+++ b/src/noffle.c	Mon Jun 05 09:57:05 2000 +0100
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 119 2000-05-20 14:11:21Z enz $
+  $Id: noffle.c 135 2000-06-05 08:57:05Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -46,6 +46,8 @@
 #include "lock.h"
 #include "portable.h"
 
+static void
+doUnsubscribe( const char *name );
 
 struct Noffle
 {
@@ -266,9 +268,7 @@
                          "days without access",
                          grp, autoUnsubscribeDays );
                 Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays );
-                Fetchlist_read();
-                Fetchlist_remove( grp );
-                Fetchlist_write();
+		doUnsubscribe( grp );
             }
             Cont_write();
             Grp_setFirstLast( grp, Cont_first(), Cont_last() );
@@ -502,7 +502,9 @@
         printf( "%s is not in fetch list.\n", name );
     else
         printf( "%s removed from fetch list.\n", name );
-    if ( ! Fetchlist_write() )
+    if ( Fetchlist_write() )
+	Grp_setRmtNext( name, GRP_RMT_NEXT_NOT_SUBSCRIBED );
+    else
         fprintf( stderr, "Could not save fetchlist.\n" );
 }