Article View: news.software.nntp
Article #8744Re: recoverying dropped overview entry
From: Katsuhiro Kondou
Date: Mon, 24 Jun 1996 00:00
Date: Mon, 24 Jun 1996 00:00
49 lines
2173 bytes
2173 bytes
In article <4qj3nq$o5p@news.uxd.fc.nec.co.jp>,
kondou@uxd.fc.nec.co.jp (Katsuhiro Kondou) writes:
} is not recovered with this. I wrote the patch to handle multiple
} lines. Here is one(diff from unoff4). Any comments will be welcome.
I just noticed unknown header with multiple lines causes expireover
dumps core. And ``strcat(lasthp->Header, ' ');'' is not needed,
because the first character of ``line'' is WHITE character and
'\t' is converted to ' '. Here is a modified patch.
*** expireover.c.org Tue Aug 8 02:43:08 1995
--- expireover.c Mon Jun 24 09:12:41 1996
***************
*** 407,412 ****
--- 407,413 ----
static BUFFER B;
register ARTOVERFIELD *fp;
register ARTOVERFIELD *hp;
+ register ARTOVERFIELD *lasthp = 0;
register QIOSTATE *qp;
register char *colon;
register char *line;
***************
*** 480,485 ****
--- 481,497 ----
if (*p == '\t' || *p == '\n' || *p == '\r')
*p = ' ';
hp->HasHeader = TRUE;
+ lasthp = hp;
+ }
+ if (lasthp && ISWHITE(*line)) {
+ register int oldsize = lasthp->Length;
+ size = strlen(line);
+ lasthp->Length += size + 1;
+ RENEW(lasthp->Header, char, lasthp->Length + 1);
+ for (p = line; *p; p++)
+ if (*p == '\t' || *p == '\n' || *p == '\r')
+ *p = ' ';
+ strcat(lasthp->Header, line);
}
}
--
Katsuhiro Kondou
NEC Corporation, Tokyo JAPAN
Technical Details
Message-ID:
<4qkp28$5h1@news.uxd.fc.nec.co.jp>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<4qj3nq$o5p@news.uxd.fc.nec.co.jp>Show Full Headers
Complete Article Headers
Message-ID: <4qkp28$5h1@news.uxd.fc.nec.co.jp> Subject: Re: recoverying dropped overview entry Date: Mon, 24 Jun 1996 00:00:00 +0000 From: kondou@uxd.fc.nec.co.jp (Katsuhiro Kondou) References: <4qj3nq$o5p@news.uxd.fc.nec.co.jp> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 162012771 Supersedes: <4qkn82$5h1@news.uxd.fc.nec.co.jp> Content-type: text/plain; charset=US-ASCII Organization: NEC Corporation Tokyo Japan Mime-version: 1.0 Reply-to: kondou@uxd.fc.nec.co.jp Newsgroups: news.software.nntp