[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] empty groups not staying in interesting groups list



Brian Sammon schrieb am 2005-01-07:

> I have a couple of groups that I'm subscribed to that are so low-traffic that 
> all the messages in the group may expire before any new ones come in.
> My news client does a "LIST ACTIVE <groupname>" every day when I run it, but 
> apparently that is not enough to keep an empty group in the interesting.groups 
> list.
> Poking around at the code, I see that this is related to a function in 
> nntpd.c, is_pseudogroup().  According to this function, an empty folder is a 
> pseudogroup.
> leafnode then decides that a pseudogroup doesn't need to have its 
> interesting.groups entry updated.

You're referring to the 1.9/1.10 series of leafnode.

Please mention this next time so save my time looking into either
version (OK I checked 1.10.7 first so no harm inflicted) :-)

> So, if I want empty groups to stay "interesting", I see two ways to fix this:
>   1) hack things so empty groups are not pseudogroups.
>   2) hack things so pseudogroups are treated just like regular groups
>      as far as interesting.groups is concerned.

#2 is the way I'll go. The point about group or list active is to
refresh existing subscriptions, but not to add new subscriptions, hence
checking if the group that is listed is interesting is sufficient, the
is_pseudogroup() check is not needed in this particular case.

How about this patch (add to 1.10.7)?

Index: nntpd.c
===================================================================
RCS file: /var/CVS/leafnode-1/nntpd.c,v
retrieving revision 1.117
diff -u -r1.117 nntpd.c
--- nntpd.c	10 Sep 2004 11:46:51 -0000	1.117
+++ nntpd.c	8 Jan 2005 01:28:38 -0000
@@ -618,13 +618,13 @@
     g = findgroup(arg);
     if (g) {
 	group = g; /* global */
+	if (isinteresting(arg)) {
+	    if (debugmode)
+		syslog(LOG_DEBUG, "marked group %s interesting", arg);
+	    markinterest(arg);
+	}
 	if (!is_pseudogroup(g)) {
 	    /* regular news group */
-	    if (isinteresting(arg)) {
-		if (debugmode)
-		    syslog(LOG_DEBUG, "marked group %s interesting", arg);
-		markinterest(arg);
-	    }
 	    if (debugmode)
 		syslog(LOG_DEBUG, ">211 %lu %lu %lu %s group selected",
 		       g->last >= g->first ? g->last - g->first + 1 : 0,
@@ -772,10 +772,11 @@
 	    g++;
 	}
     } else {
+	/* single group */
 	g = findgroup(pattern);
 	if (g) {
 	    printlist(g, what);
-	    if (what == 0 && !is_pseudogroup(g) && isinteresting(pattern))
+	    if (what == 0 && isinteresting(pattern))
 		markinterest(pattern);
 	}
     }

-- 
Matthias Andree
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/