Patches for ov3 and makehistory

Richard Todd rmtodd at skywalker.ecn.ou.edu
Sat Jul 24 06:28:45 UTC 1999


Fixing a couple of bugs:
1) Bogus error message in makehistory
2) Problem in tradindexed_add that showed up when rebuilding overview from
scratch and you had recently done some rmgroups -- the removed group is gone
from active (and hence from the new group.index), but there are still articles
in spool with Xref:s in the removed group.  tradindexed_add attempts to
write to the overview for the removed group, fails, and reports an error. 
This patch makes tradindexed_add ignore the error and continue with the other
groups the article is crossposted to if the group is no longer in group.index.

Index: expire/makehistory.c
===================================================================
RCS file: /home/rmtodd/TempCVS/Temp-CVS-Repository/inn-current/expire/makehistory.c,v
retrieving revision 1.9
diff -u -r1.9 makehistory.c
--- makehistory.c	1999/07/04 05:56:45	1.9
+++ makehistory.c	1999/07/23 03:37:21
@@ -185,7 +185,7 @@
     char *line, *p, *q;
 
     if (fflush(OverTmpFile) == EOF || ferror(OverTmpFile) || fclose(OverTmpFile) == EOF) {
-	(void)fprintf(stderr, "Can't close history file, %s\n",	strerror(errno));
+	(void)fprintf(stderr, "Can't close OverTmp file, %s\n",	strerror(errno));
 	exit(1);
     }
 
Index: storage/ov3/ov3.c
===================================================================
RCS file: /home/rmtodd/TempCVS/Temp-CVS-Repository/inn-current/storage/ov3/ov3.c,v
retrieving revision 1.1.1.2
@@ -790,8 +792,20 @@
 	if (artnum <= 0)
 	    continue;
 
-	if ((gh = OV3opengroup(group, TRUE)) == NULL)
-	    return FALSE;	
+	if ((gh = OV3opengroup(group, TRUE)) == NULL) {
+	    /*
+	    ** check to see if group is in group.index, and if not, just 
+	    ** continue (presumably the group was rmgrouped earlier, but we
+	    ** still have articles referring to it in spool).
+	    */
+	    gloc = GROUPfind(group);
+	    if (GROUPLOCempty(gloc))
+		continue;
+	    /*
+	    ** group was there, but open failed for some reason, return err.
+	    */
+	    return FALSE;
+	}	
 	sprintf(overdata, "%d\t", artnum);
 	i = strlen(overdata);
 	memcpy(overdata + i, data, len);


More information about the inn-patches mailing list