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

Re: [leafnode-list] fix SEGV in nntpd.c



Actually this patch evidently wasn't quite right, so here it is fixed -
xovergroup is only meant to be set to group when the xover data in memory
matches the group. So just NULLify it instead, so that getxover() will be
run again.

It does seem a bit odd to reread the entire xover data again though.
Perhaps someone should consider a different approach? Anyway, this patch
should do the trick now:

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

        * nntpd.c (rereadactive): Preserve group 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 20:35:10 2002
@@ -117,10 +117,19 @@
     xsnprintf(s, SIZE_s, "%s/leaf.node/groupinfo", spooldir);
 
     if ((!stat(s, &st) && (st.st_mtime > activetime)) || (active == NULL)) {
+        char *grouptmp=NULL;
 	if (debugmode)
 	    syslog(LOG_DEBUG, "rereading %s", s);
+        if (group) {
+            grouptmp = critstrdup(group->name, "rereadactive");
+        }
 	readactive();
 	activetime = st.st_mtime;
+        if (group) {
+            group = findgroup(grouptmp);
+            xovergroup = NULL;
+            free(grouptmp);
+        }
     }
 }