[jcifs] SmbFileInputStream [was jcifs bug]

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Thu Mar 28 10:22:40 EST 2002


Ok, so then there is not necessarily a bug in the current release then. Looking
forward to hearing how the stock SmbFileInputStream works for you.

Mike

> -----Original Message-----
> From:	Bernie Wieser [SMTP:bernie.wieser at calgary.qcdata.com]
> Sent:	Wednesday, March 27, 2002 1:04 PM
> To:	Allen, Michael B (RSCH)
> Subject:	RE: [jcifs] jcifs bug
> 
> I believe I tried that too; I will try it again, as I realized my
> ==0 continue will blow on zero length files.
> 
> -----Original Message-----
> From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> Sent: Tuesday, March 26, 2002 5:27 PM
> To: 'Bernie Wieser'
> Subject: RE: [jcifs] jcifs bug
> 
> 
> 
> 
> > -----Original Message-----
> > From:	Bernie Wieser [SMTP:bernie.wieser at calgary.qcdata.com]
> > Sent:	Tuesday, March 26, 2002 7:22 PM
> > To:	Allen, Michael B (RSCH)
> > Subject:	RE: [jcifs] jcifs bug
> >
> > I just looked back into my "non blocking" notion re SMBFile.send and that
> > may not be how it works...  but
> > in a nut shell,
> > 1) a read call is getting called on a file with buf size of 8k
> > 2) the read gets some 80 bytes
> > 3) the read exits with 80
> > 4) buf input stream calls read again (because partial reads ok)
> > 5) read gets ZERO bytes (ok for non blocking io)
> > 6) read exits with 0
> >
> 	Wait a minute. I don't see how that can happen. The 0.6.1 code has:
> 
> 	            if(( n = response.dataLength ) <= 0 ) {
> 	                return -1;
> 	            }
> 
> 	http://jcifs.samba.org/src/src/jcifs/smb/SmbFileInputStream.java
> 
> 	If the read returned 0 it should exit with -1 not 0. The 0.6.0 code didn't
> 	have this. Is it possible the 0.6.0 code slipped into your version contol?
> 
> 	Mike.
> 
> > 7) return to 4...
> >
> > B.
> >
> > -----Original Message-----
> > From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> > Sent: Tuesday, March 26, 2002 4:53 PM
> > To: 'Bernie Wieser'
> > Cc: jcifs at samba.org; crh at ubiqx.mn.org
> > Subject: RE: [jcifs] jcifs bug
> >
> >
> > Uh-oh. Looks like I introduced a serious big trying to fix the last
> serious
> > bug. How
> > are you reproducing this exactly?
> >
> > Thanks,
> > Mike
> >
> > > -----Original Message-----
> > > From:	Bernie Wieser [SMTP:bernie.wieser at calgary.qcdata.com]
> > > Sent:	Tuesday, March 26, 2002 4:05 PM
> > > To:	Michael B. Allen; crh at ubiqx.mn.org
> > > Cc:	jcifs at samba.org
> > > Subject:	RE: [jcifs] jcifs bug
> > >
> > >
> > > I've found why the SmbFileInputStream hangs...  and it is 100%
> > reproducable
> > > for me.  So I've
> > > fixed it.
> > >
> > 	<snip code to fix>
> >
> >
> 
> 





More information about the jcifs mailing list