logo       

Re: Batching command in CIFS: msg#00144

network.samba.java

Subject: Re: Batching command in CIFS

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);

send(req1,resp1);
}
}

However, when I call this methed, the FID in the batched command,
SMB_COM_CLOSE, is not the same FID as in the first command,
SMB_COM_READ_ANDX and thus got error response .
I tried to modify the fid parameter in SmbComClose(), and got strange
result. It's not even the integer I set. It seems that
writeParameterWordsWireFormat() of class SmbComClose has some
problem....

Could anyone help?




On Thu, 27 Jan 2005 18:53:29 -0500 (EST), Michael B Allen
<mba2000@xxxxxxxxxx> wrote:
> Christopher R. Hertel said:
> >> What should I put in the first parameter of SmbComReadAndX() call if I
> >> want to batch it with SmbComNTCreateAndX ()?
> >
> > Try zero.
>
> Right.
>
> Mike
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise