nnrpd/artcle.c XPAT bug fix
Process Pasteurized Fluffy Product
supersede at india.com
Fri Apr 14 03:54:32 UTC 2000
I hope this isn't considered to be new functionality. If it has to
wait for 2.4, I'll understand. *whimper*
This restores the ability to use XPAT on non-overview headers. Other
than adding wildmat it's pretty much just cut-and-paste from the
simliar patch that went in long ago for XHDR.
*** article.c.old Tue Mar 14 23:10:11 2000
--- article.c Thu Apr 13 23:35:51 2000
***************
*** 1049,1059 ****
break;
}
! if (Overview < 0) {
! Reply("%d Header not in index\r\n", NNTP_SYNTAX_VAL);
return;
}
if ((handle = (void *)OVopensearch(GRPcur, range.Low, range.High)) == NULL) {
Reply("%d %s fields follow\r\n.\r\n", NNTP_HEAD_FOLLOWS_VAL, av[1]);
return;
--- 1049,1076 ----
break;
}
! /* Not in overview, we have to fish headers out from the articles */
! if (Overview < 0 ) {
! Reply("%d %s matches follow\r\n", NNTP_HEAD_FOLLOWS_VAL, av[1]);
! pattern = Glom(&av[3]);
! for (i = range.Low; i <= range.High && range.High > 0; i++) {
! if (!ARTopen(i))
! continue;
! p = GetHeader(av[1], FALSE);
! if (p && wildmat(p, pattern)) {
! (void)sprintf(buff, "%d ", i);
! SendIOb(buff, strlen(buff));
! SendIOb(p, strlen(p));
! SendIOb("\r\n", 2);
! ARTclose();
! }
! }
! SendIOb(".\r\n", 3);
! PushIOb();
return;
}
+ /* Okay then, we can grab values from overview. */
if ((handle = (void *)OVopensearch(GRPcur, range.Low, range.High)) == NULL) {
Reply("%d %s fields follow\r\n.\r\n", NNTP_HEAD_FOLLOWS_VAL, av[1]);
return;
More information about the inn-patches
mailing list