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

[leafnode-list] fix SEGV in nntpd.c



I hear tell of a 1.9.21pre1 but can't see it anywhere to tell if this has
been fixed there (please make it available if so!). It looks like the same
problem might affect the 2.0prereleases too. Here's my patch against
1.9.20.rel:

2002-04-01  Jonathan Larmour  <jlarmour@xxxxxxxxxx>

	* nntpd.c (rereadactive): Preserve group and xovergroup between
	rereadings.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine--- leafnode-1.9.20.rel.pristine/nntpd.c	Fri Mar 22 09:28:17 2002
+++ leafnode-1.9.20.rel/./nntpd.c	Mon Apr  1 19:49:10 2002
@@ -117,10 +117,25 @@
     xsnprintf(s, SIZE_s, "%s/leaf.node/groupinfo", spooldir);
 
     if ((!stat(s, &st) && (st.st_mtime > activetime)) || (active == NULL)) {
+        char *grouptmp=NULL, *xovergrouptmp=NULL;
 	if (debugmode)
 	    syslog(LOG_DEBUG, "rereading %s", s);
+        if (group) {
+            grouptmp = critstrdup(group->name, "rereadactive");
+        }
+        if (xovergroup) {
+            xovergrouptmp = critstrdup(xovergroup->name, "rereadactive");
+        }
 	readactive();
 	activetime = st.st_mtime;
+        if (group) {
+            group = findgroup(grouptmp);
+            free(grouptmp);
+        }
+        if (xovergroup) {
+            xovergroup = findgroup(xovergrouptmp);
+            free(xovergrouptmp);
+        }
     }
 }