[2.3] lowmark

Katsuhiro Kondou kondou at nec.co.jp
Sat Sep 2 17:47:19 UTC 2000


In article <8ordgi$ksl$1 at krell.zikzak.de>,
	Bettina Fink <laura at hydrophil.de> wrote;

} The two cancelled articles on the 2.3 machine have "normal"
} history entries:

Ok, I've just written a patch to purge overview data.  Try
attached and tell me how it's going.

} The problem with the mysterious returning "1584" is on a trad
} spool 2.2.3 with "traditional" overview, not on a 2.3.x, see 
} my last mail for details ... And I thought Russ and you are not

Oops, I should have read it more carefully.  ctlinnd renumber
should work then.

-- 
Katsuhiro Kondou

--- storage/ov.c.orig	Thu Aug 31 07:23:24 2000
+++ storage/ov.c	Sun Sep  3 02:31:46 2000
@@ -1152,6 +1152,9 @@
     static STRING	History;
     HASH		key;
     OFFSET_T		offset;
+    static FILE		*F;
+    int			i, c;
+    char		buff[(sizeof(TOKEN) * 2) + 3];
 
     if (!ReadOverviewfmt) {
 	OVfindheaderindex();
@@ -1162,11 +1165,31 @@
 	    syslog(L_ERROR, "OVhisthasmsgid: dbzinit failed '%s'", History);
 	    return FALSE;
 	}
+	if ((F = fopen(History, "r")) == NULL) {
+	    syslog(L_ERROR, "OVhisthasmsgid: fopen failed '%s', %m", History);
+	    return FALSE;
+	}
     }
     if ((p = OVERGetHeader(data, Messageidindex)) == NULL)
 	return FALSE;
     key = HashMessageID(p);
-    if (dbzfetch(key, &offset))
+    if (!dbzfetch(key, &offset))
+	return FALSE;
+    if (fseek(F, offset, SEEK_SET) == -1) {
+	syslog(L_ERROR, "OVhisthasmsgid: fseek failed to %ld '%s', %m", offset, History);
+	return FALSE;
+    }
+    for (i = 2; (c = getc(F)) != EOF && c != '\n'; )
+	if (c == HIS_FIELDSEP && --i == 0)
+	    break;
+    if (c != HIS_FIELDSEP)
+	return FALSE;
+    i = 0;
+    while ((c = getc(F)) != EOF && c != ' ' && c != '\n' && i < (sizeof(TOKEN) * 2) + 2) {
+	buff[i++] = (char)c;
+    }
+    buff[i] = '\0';
+    if (IsToken(buff))
 	return TRUE;
     return FALSE;
 }



More information about the inn-workers mailing list