[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Re: leafnode-2 doesn't give out default-article
"clemens fischer" <ino-qc@xxxxxxxxxxxxxxxxxxxxxx> writes:
> Joerg Dietrich <joerg@xxxxxxxxxxxx>:
>
>> Mew tried to retireve the article by Message-ID. This is
>> relatively unusual for newsreaders, most try to retrieve articles
>> by article number. In principle both should work equally well,
>> but the check whether a pseudo-article is requested is only made
>> when an article is requested by article number. This is a bug in
>> fopenart() in nntpd.c
>
> ah! makes sense. i retried the same actions manually with telnet
> and wondered why i couldn't repeat this behaviour with arbitrary
> newsgroups.
Does this patch help you?
Index: nntpd.c
===================================================================
RCS file: /var/CVS/leafnode-2/nntpd.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- nntpd.c 9 Feb 2003 23:41:33 -0000 1.115
+++ nntpd.c 16 Mar 2003 11:53:27 -0000 1.116
@@ -403,8 +403,10 @@
/* local is never pseudo */
if (is_localgroup(group)) return FALSE;
+#if 0
/* interesting is never pseudo */
if (is_interesting(group)) return FALSE;
+#endif
/* make sure that is_localgroup is FALSE here: */
if (!chdirgroup(group, FALSE)) return TRUE;
@@ -448,7 +450,11 @@
markinterest(group->name); /* FIXME: check error */
/* else try message-id lookup */
} else if (arg && *arg == '<') {
- f = fopen(lookup(arg), "r");
+ if (!strncmp(arg, "<leafnode:placeholder:", 22)) {
+ f = fopenpseudoart(group, arg, 0);
+ } else {
+ f = fopen(lookup(arg), "r");
+ }
} else if (group && *artno) {
char s[64];
(void)chdirgroup(group->name, FALSE);
@@ -2040,7 +2046,8 @@
}
} else {
/* _is_ pseudogroup */
- if (arg && (b < group->first || a > group->last+1 || a > b)) {
+ if (!b) b = a;
+ if (arg && (b < group->first || a > b || a > group->last+1)) {
nntpprintf("420 No articles in specified range.");
return;
}
--
Matthias Andree
leafnode-1 download: http://sourceforge.net/projects/leafnode/
leafnode-1 docs/new: http://mandree.home.pages.de/leafnode/
leafnode-2 homepage: http://mandree.home.pages.de/leafnode/beta/
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list