[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] v 2.0b8_ma2, is delay body working?



On 10 Feb 2001 18:29:47 +0100, Matthias Andree wrote:

>"Volker Apelt" <va@xxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
>
>> Is the delay body feature working in v 2.08b_ma2 ?
>
>> My installation is not downloading any  body at all
>> and it never records any messages in
>> /intresting.groups/"group...name"
>
>Then it's broken. Thanks for the report.

Hmm, how do you debug suid programs with gdb?

This seem to be a problem with leafnodes detection
of already downloaded articles versus articles for which
only the header already available.

How is leafnode supposed to know which is which ?

If there is no mechanism yet, I suggest to add 
a cache file ".delayed_bodys" to each group dir
which keeps that information.  It could be an 
mmaped array of struct { long msgno; char delayed }; 
sorted by msgno.

It should have one entry for each article file in that 
directory. "delayed" is !=0 if that article is a pseudo.
Whenever a function needs to know, if  article #msgno is
a pseudo, it does a bsearch over this array. 
The only programs which need to maintain (change) the 
delayed_body info are fetchnews and rnews.
Or add a "X-Leafnode-parts: " line to each pseudo header
which names all avaliable parts. That will make the 
information avail to the newsclients, too. 
Do you agree ? 

In nnptd.c fopenart(msgno_or_msgid) seems to make that 
decission. So, fopenart should return that information, 
if it knows about full-messages vs. pseudo-messages.
I have added a new parameter "int* need_download"
to fopen's prototype. And, voila, leafnode now records 
the  message id's in /interesting.groups/g.r.o.u.p.

The second stage is fetchnews, which has the same 
problem. But I could not indentify the function which
tries to detect pseudo vs. full messages. 
Is  getarticle() supposed to make that decission?

How is it supposed to decide?

The patch file appended is for nntpd.c in v2.0b8_ma2
and inserts the  need_downoad parameter to  fopenart().

The patched version will not store any downloaded message body, yet.
Instead it tries to download them, but fails to recognize
they are a new / pseudo. So, it loggs  (fetchnews.c in fopenmsgid() )
"article %mesgid already stored" foreach msg,  skips the body 
and removes the entry from /interesting.groups/g.r.o.u.p.

Here is a list of other oddities I have observed:

*  	"make install"	creates a
/var/spool/news/leaf.node/local.groups 
	file. ( ? instead of /etc/local.groups ?)
	
* 	leafnode	complains about the format of a 
	/etc/local.groups file, even if it has the same format as 
 	/var/spool/news/leaf.node/local.groups.  
			 
*  	When a group is subscribed for the first time with 
	delay body  it records  "425 No such aticle number" in
        /interesting.groups/g.r.o.u.p.  


-- 
Volker Apelt               Group of Prof. Dr. Ch. Griesinger
                           Johann Wolfgang Goethe Universitaet
                           Frankfurt am Main (Germany)
va@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



-- 
Volker Apelt               Group of Prof. Dr. Ch. Griesinger
                           Johann Wolfgang Goethe Universitaet
                           Frankfurt am Main (Germany)
va@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Attachment:
nntpd.c.diff

Attachment: bin00002.bin
Description: "Description: Binary data"