🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #54539

piping via newsfeeds problem

#54539
From: Anne Wilson
Date: Fri, 05 Oct 2001 15:24
60 lines
3518 bytes
Hi there!

I am testing the possibility of using a news server to transmit
meteorological data products.  Since this data is binary, I use a simple
encoding to make it acceptable to INN for transmission.  My encoding
program is called 'makeArticle' and here's how I use it:

./makeArticle <  <rawFileName> | inews -h -S 


On the backend, I have written a program, called 'retrieveArtAsProd',
that takes an article token as input.  Then it uses the sm to grab the
article and decode it.  The idea is to get back the original data
product that I transmitted.

I am testing only on my local machine.  My program works great when I
run it from the command line, giving it an article token as input.  I
get back the identical data product that I posted via inews.  The
command looks like:

./retrieveArtAsProd <  <tokenFileName>  >  /opt/news/test/sent.out

However, when I try to get the same thing to happen via newsfeeds, the
end of the file is always chopped off.  Here is my newsfeeds entry:

test!:!*,unidata.hds\
        :Tc,Wn:\
        /opt/news/util/dataProdHandlers/retrieveArtAsProd >
/opt/news/test/sent.out

In this case, the file sent.out is always too short.  The chopping
always occurs on a byte that is a power of 8 boundary, e.g. in one case,
the product is chopped on byte 1100000 base 8, in another case it's
chopped on 2450000 base 8, and in a third case it's chopped on 2240000
base 8.   I've tried 'ctlinnd flush test!' and 'ctlinnd flush ""' to
ensure that nothing's hanging around in a buffer, but that doesn't make
any difference.

I believe my program is completely debugged, so at this point I'm not
even sure what to look at.  Any suggestions??

Also, there's another wierdness.  Sometimes when I post the data
product, the file sent.out never appears!  This is especially odd.  It
seems periodic - just sometimes for a little while my posting via inews
generates no resulting file.   I've done this up to three or four times
in a row.   Then if I wait a little while and post again the file is
created.  What the heck is up???

Any tips are greatly appreciated.  Thanks!!

Anne
-- 
***************************************************
Anne Wilson			UCAR Unidata Program		
anne@unidata.ucar.edu		       P.O. Box 3000
              			  Boulder, CO  80307
----------------------------------------------------
Unidata WWW server       http://www.unidata.ucar.edu/
****************************************************
Technical Details
Message-ID: <3BBDD092.D1CF35F8@unidata.ucar.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!enews.sgi.com!nntp.wetware.com!attdv1!attdv2!ip.att.net!frgp!ucar!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <3BBDD092.D1CF35F8@unidata.ucar.edu>
Subject: piping via newsfeeds problem
Date: Fri, 05 Oct 2001 09:24:02 -0600
From: Anne Wilson <anne@unidata.ucar.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!enews.sgi.com!nntp.wetware.com!attdv1!attdv2!ip.att.net!frgp!ucar!not-for-mail
Newsgroups: news.software.nntp
Organization: UCAR
Lines: 59
NNTP-Posting-Host: imogene.unidata.ucar.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.ucar.edu 1002295438 5674 128.117.140.28 (5 Oct 2001 15:23:58 GMT)
X-Complaints-To: news@news.ucar.edu
NNTP-Posting-Date: 5 Oct 2001 15:23:58 GMT
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2smp i686)
X-Accept-Language: en