To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.generalOpen lugnet.admin.general in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / General / 1037
1036  |  1038
Subject: 
Re: posting failure?
Newsgroups: 
lugnet.admin.general
Date: 
Wed, 10 Feb 1999 14:08:59 GMT
Viewed: 
1175 times
  
Todd Lehman writes:

I think the bug almost certainly lies in the last line of datasend().  The
Camel Book says that callers of syswrite() should be prepared to handle the
problems that standard I/O normally handles, such as partial writes.[2]

Since ~16KB is a reasonable buffer size for sockets, and will handle most
news articles without insidious problems, I think what's happening is that
datasend() is returning false to post() when it's sent largish chunks of
data.  Note also that post() doesn't call dataend() if datasend() fails.
This seems to cause quit() to hang later.

Instead of using post(@lines), a successful workaround is to use post() and
send the article line-by-line with repeated datasend($line) calls.
(Luckily, calling datasend() directly is a perfectly acceptable use of
Net::NNTP, according to its docs, so it's not really a kludge -- although
it's probably 1/100 second slower on a large article.)

Anyway, I'll go apply the workaround to the mail-gateway and web-interface
posting scripts -- then you can post your 27 KB .DAT file[3] -- and then
I'll probably submit a patch for consideration to the author of Net::Cmd,
which will also give me a chance to become more certain about the true
nature of the bug.

--Todd

[1] The post() and datasend() functions in the versions of Net::NNTP and
Net::Cmd that I have installed are identical to the latest & greatest
releases on CPAN.

[2] _Programming_Perl_, Second Edition, p. 231.

[3] Some of the lines on the KODIAK1.DAT file you uploaded are longer than
80 characters; you probably will experience line-wrapping problems if you
post it through the web interface.  I recommend sending it through the
e-mail gateway to lugnet.cad.dat.  Maybe the news-posting script can be
modified later to specially handle an actual .DAT file-upload...

Todd,
    Thanks for all your hard work to diagnose this problem.  I've sent off the
file via email again, so we'll see if it works now.
Thanks again,

Ben.



Message is in Reply To:
  Re: posting failure?
 
(...) Getting closer...I have a workaround. I'll have to talk to the authors of the Net::Cmd module to be absolutely certain about the nature of the problem, but I think I see it clearly now. The post() method of Net::NNTP goes like this[1]: sub (...) (26 years ago, 8-Feb-99, to lugnet.admin.general)

12 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR