[jcifs] Batching command in CIFS

Michael B Allen mba2000 at ioplex.com
Sat Jan 29 21:15:07 GMT 2005


On Sat, 29 Jan 2005 20:38:17 +0800
Cellina Lin <cellina at gmail.com> wrote:

> Thanks. 
> I tried to prototype a methed  ReadAndClose() as below.
> 
> public class BatchingTests extends SmbFile {
>     public void ReadAndClose() throws SmbException {
> 
>         byte[] b = new byte[1024];
>         
>         SmbComReadAndX req1 = new SmbComReadAndX(fid, fp, 10, new
> SmbComClose( fid, 0L ));
>         SmbComReadAndXResponse resp1 = new SmbComReadAndXResponse(b, 0);

AFAICT that should work. Add 'throw new RuntimeException( "" + fid );' in
SmbComClose.writeParameterWordsWireFormat() to get the exact sequence of
call's it's going through. Somehow the fid specified in the SmbComClose
constructor must be getting clobbered. Put 'System.err.println( "fid:
" + ((SmbComClose)andx).fid);' debugging statements in the methods in
the trace to determine where it's getting clobbered.

Mike

-- 
Greedo shoots first? Not in my Star Wars.


More information about the jcifs mailing list