nnrpd issue
Katsuhiro Kondou
Katsuhiro_Kondou at isc.org
Sun Nov 24 03:51:40 UTC 2002
In article <20021120.234655.41630516.kondou at isc.org>,
Katsuhiro Kondou <Katsuhiro_Kondou at isc.org> wrote;
} } One approach would be to get it to use the overview database and
} } return the standard porkies you get with that approach with
} } nnrpdcheckart turned off.
}
} Hm, that should improve the situation, and the fixing
} the code looks trivial.
I wrote the patch. Pavel, could you try attached and
tell me how the thing improved?
--
Katsuhiro Kondou
Index: article.c
===================================================================
RCS file: /home/kondou/news/inn/repository/inn/nnrpd/article.c,v
retrieving revision 1.86.2.14
diff -u -r1.86.2.14 article.c
--- article.c 30 Sep 2002 03:26:46 -0000 1.86.2.14
+++ article.c 24 Nov 2002 03:48:43 -0000
@@ -758,6 +758,9 @@
int delta;
int errcode;
STRING message;
+ ARTNUM artnumber;
+ void *handle;
+ struct timeval stv, etv;
if (!PERMcanread) {
Reply("%s\r\n", NOACCESS);
@@ -790,6 +793,34 @@
Reply("%d No %s to retrieve.\r\n", errcode, message);
ARTnumber = save;
return;
+ }
+
+ if (!PERMaccessconf->nnrpdcheckart && delta == 1) {
+ if (PERMaccessconf->nnrpdoverstats)
+ gettimeofday(&stv, NULL);
+ if ((handle = (void *)OVopensearch(GRPcur, ARTnumber, ARThigh)) == NULL) {
+ Reply("%d No %s to retrieve.\r\n", errcode, message);
+ ARTnumber = save;
+ return;
+ }
+ if (OVsearch(handle, &artnumber, NULL, NULL, NULL, NULL) == FALSE) {
+ OVclosesearch(handle);
+ if (PERMaccessconf->nnrpdoverstats) {
+ gettimeofday(&etv, NULL);
+ OVERtime+=(etv.tv_sec - stv.tv_sec) * 1000;
+ OVERtime+=(etv.tv_usec - stv.tv_usec) / 1000;
+ }
+ Reply("%d No %s to retrieve.\r\n", errcode, message);
+ ARTnumber = save;
+ return;
+ }
+ OVclosesearch(handle);
+ if (PERMaccessconf->nnrpdoverstats) {
+ gettimeofday(&etv, NULL);
+ OVERtime+=(etv.tv_sec - stv.tv_sec) * 1000;
+ OVERtime+=(etv.tv_usec - stv.tv_usec) / 1000;
+ }
+ ARTnumber = artnumber;
}
while (!ARTopen(ARTnumber)) {
More information about the inn-workers
mailing list