Thread View: news.software.nntp
2 messages
2 total messages
Started by Katsuhiro Kondou
Sun, 23 Jun 1996 00:00
recoverying dropped overview entry
Author: Katsuhiro Kondou
Date: Sun, 23 Jun 1996 00:00
Date: Sun, 23 Jun 1996 00:00
45 lines
1948 bytes
1948 bytes
Overveiw entries are sometimes dropped when the channels are flushed
in some environment(especially with streaming). ``expireover -a -s''
can recover the dropped entries, but a header which has multiple lines
is not recovered with this. I wrote the patch to handle multiple
lines. Here is one(diff from unoff4). Any comments will be welcome.
*** expireover.c.org Tue Aug 8 02:43:08 1995
--- expireover.c Sun Jun 23 18:16:24 1996
***************
*** 407,412 ****
--- 407,413 ----
static BUFFER B;
register ARTOVERFIELD *fp;
register ARTOVERFIELD *hp;
+ register ARTOVERFIELD *lasthp;
register QIOSTATE *qp;
register char *colon;
register char *line;
***************
*** 480,485 ****
--- 481,498 ----
if (*p == '\t' || *p == '\n' || *p == '\r')
*p = ' ';
hp->HasHeader = TRUE;
+ lasthp = hp;
+ }
+ if (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, " ");
+ strcat(lasthp->Header, line);
}
}
--
Katsuhiro Kondou
NEC Corporation, Tokyo JAPAN
Re: recoverying dropped overview entry
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads