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

Re: [leafnode-list] fetchnews fails to download bodies



* Stefan Wiens <s.wi@xxxxxxx> [010122 20:43]:

> > I have added some additional syslog calls in nntpd.c from which I 
> > could see that markdownload is not executed because the expression
> > ( *s != '\n' ) evalutates to false (whatever that means). :-/
> 
> I don't use delaybody, so I'm unable to check this.
> 
> That test in nntpd.c seems to look for an article without a body part.
> 
> In fetchnews.c:689:
>         fprintf( f, "\n[ Thread has been marked for download ]\n" );
> 
> a dummy body is appended to the downloaded headers.


I'm working on it right now. As far as I understand, an article will
never be marked for download, because of the following:

In doarticles:

,----
|     while (fgets(s, 1024, f) && *s && (*s!='\n')) {
|         if (what & 2) {
|             p = s;
|             if ( (p = strchr(p, '\n')) )
|                 *p = '\0';
|
|             printf("%s%s\r\n", *s=='.' ? "." : "", s); /* . on headers :( */
|         }
|     }
`----

I.e. nntpd reads every line in the dummy article until it finds a line that
consists of a newline only.

The dummy articles however are of the following form:

,----
| From: ...
| Subject: ...
| Message-ID: ...
| References: ...
| Date: ...
| Newsgroups: ...
| Lines: ...
| Bytes: ...
|
| [ Thread has been marked for download ] 
`----

So the second last line consists of a newline only, nntpd stops further
reading, (*s!='\n') evaluates to false and therefore markdownload is 
always skipped.

Will try to fix that and see what happens. Thanks so far.

Regards - Juergen.




further and 

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list