Yeah, under linux it will give the length in bytes under all conditions, I
didn't know that Windows was annoying about that (I should have known
though, now that I think about it might have done so in my DOS days as well). I
was actually considering using name.length() all the time so I could loose the
int counting how much was read, but apparently that is not going to work.

Do we really _have_ to run on Windoze? Just the thought of my code running on
it bothers me :-).

On Sun, 16 Apr 2000, Theodore Hong wrote:
> Oskar Sandberg wrote:
> > Is this reproducible? because what it looks like is simply the
> connection
> > being closed in the middle of the transfer. What i find strangest is
> that
> > ConnectionHandler #1 is not being closed properly.
> 
> I've just fixed this (I think =).  The problem is that at the time the
> DataCB callback is called, the output file has not yet been closed, so
> it thinks the file is incomplete (name.length() == 0) and gives:
> 
> > > Apr 15, 2000 3:24:11 AM:Data.java:Debug:Read attempted from bad file
> 
> > > Apr 15, 2000 3:24:11 AM:DataSend.java:Normal:Not caching data for
> > > a36a3cb1304423cb, bad data stream
> 
> You can see this more clearly by just inserting with -htl 1 -- the data
> never makes it into your local datastore.
> 
> Probably under Linux name.length() returns the true length of the file
> even if it hasn't yet been closed.  I'll check this in when I get cvs
> access again (network is down).
> 
> not sure about the connectionhandler, though.
> theo
> 
> 
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to