1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-03 17:05:54 +03:00

r12725: some minor updates

metze
(This used to be commit f2e97983f278211c6d70400ce1f43d6a69df0d8a)
This commit is contained in:
Stefan Metzmacher 2006-01-05 16:43:56 +00:00 committed by Gerald (Jerry) Carter
parent af5032acfd
commit db04cffbbf
4 changed files with 4 additions and 4 deletions

View File

@ -576,7 +576,7 @@
#define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
#define _smb_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0x10000)>>16; \
(buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
#define _smb_setlen2(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \
#define _smb2_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \
(buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
#endif /* _SMB_H */

View File

@ -184,7 +184,7 @@ struct smbcli_request *smbcli_transport_connect_send(struct smbcli_transport *tr
memcpy(p, calling_blob.data, calling_blob.length);
p += calling_blob.length;
_smb_setlen(req->out.buffer, PTR_DIFF(p, req->out.buffer)-4);
_smb_setlen(req->out.buffer, PTR_DIFF(p, req->out.buffer) - NBT_HDR_SIZE);
SCVAL(req->out.buffer,0,0x81);
if (!smbcli_request_send(req)) {

View File

@ -272,7 +272,7 @@ void smb2_transport_send(struct smb2_request *req)
DATA_BLOB blob;
NTSTATUS status;
_smb_setlen2(req->out.buffer, req->out.size - NBT_HDR_SIZE);
_smb2_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
DEBUG(2, ("SMB2 send seqnum=0x%llx\n", (long long)req->seqnum));
dump_data(5, req->out.body, req->out.body_size);

View File

@ -87,7 +87,7 @@ void smb2srv_send_reply(struct smb2srv_request *req)
NTSTATUS status;
if (req->out.size > NBT_HDR_SIZE) {
_smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
_smb2_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
}
blob = data_blob_const(req->out.buffer, req->out.size);