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

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



Juergen Salk <juergen.salk@xxxxxx> writes:

> Changed fetchnews.c:689: 
> from:
>         fprintf( f, "\n[ Thread has been marked for download ]\n" );
> to:
>         fprintf( f, "[ Thread has been marked for download ]\n" );
> and removed superfluous newlines in older dummy articles.

This results im articles with a broken header line.

With the following changes, delaybody works for me:

$ diff fetchnews.c.orig fetchnews.c
689c689
<		   fprintf( f, "\n[ Thread has been marked for download ]\n" );
---
> /*		   fprintf( f, "\n[ Thread has been marked for download ]\n" );*/
863c863
<     if ( (f = fopenmsgid( filename, FALSE )) == NULL ) {
---
>     if ( (f = fopenmsgid( filename, TRUE )) == NULL ) {

This is no proper solution. The author of those lines should take a
look at it.

BTW, I just noticed that the [fm]?getheader() functions return newly
allocated memory. Most functions calling them don't free() the
returned string, leaking memory.

> Marked some articles for download. Seems to work now.  Next
> fetchnews run ends up with a segfault.

The segfault you receive seems not to be directly related to the
change you have made. What OS and libc are you using? It may indicate
that fetchnews had somehow trashed malloc's internal data. Looks
a bit obscure to me.

Stefan


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