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

Re: [leafnode-list] leafnode 1.9.20.rc8 -- hopefully final release candidate



Pierre Abbat wrote:
> The bug that I reported as being in 1.9.18 is, as far as I can see by reading 
> the source, still in 1.9.20.rc8. Starting at line 1081:
> 
> 	xsnprintf(lineout, SIZE_lineout, "BODY %ld\r\n", stufftoget[i]);
> 	putaline();
> 	l = getaline(nntpin);
> 	if (!l)			/* timeout */
> 	    return server;
> 	if (sscanf(l, "%3ld", &n) != 1 || (n / 10 != 22)) {
> 	    syslog(LOG_INFO, "%ld: reply %s", stufftoget[i], l);
> 	    continue;
> 
> This means that if fetchnews gets a reply code other than 22*, it will leave 
> f open, and if this happens more than 1024 times, it will run out of file 
> descriptors. There should be "fclose(f)" before "continue".

.and as well in the l==NULL case.  Additionally, one should think about
unlinking the file in both cases.

And depending on the way NewsPlex handles article headers and bodies
that might just fix the problems Michael O'Quinn described in the
"SIGPIPE Issues" thread (his LOG_INFO output might give additional
info), but this is just a wild guess without delving deeply into the
source.

Regards,
Ralf

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