summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-05 16:43:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:45 -0500
commitdb04cffbbfe15a52b954960ff0eb40d2a5e4f00d (patch)
treedab01e1b28482f7c3ec6d87d8efc019cb555b8de /source4
parentaf5032acfdf24d49eafcd981e4a6809ce15d6fd0 (diff)
downloadsamba-db04cffbbfe15a52b954960ff0eb40d2a5e4f00d.tar.gz
samba-db04cffbbfe15a52b954960ff0eb40d2a5e4f00d.tar.bz2
samba-db04cffbbfe15a52b954960ff0eb40d2a5e4f00d.zip
r12725: some minor updates
metze (This used to be commit f2e97983f278211c6d70400ce1f43d6a69df0d8a)
Diffstat (limited to 'source4')
-rw-r--r--source4/include/smb.h2
-rw-r--r--source4/libcli/raw/clitransport.c2
-rw-r--r--source4/libcli/smb2/transport.c2
-rw-r--r--source4/smb_server/smb2/receive.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/source4/include/smb.h b/source4/include/smb.h
index 5297ef9e27..78a66dd20a 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.h
@@ -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 */
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index a0efe7042c..df5c608d08 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -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)) {
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index d5591fa11c..6567ad4de7 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -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);
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c
index a1f12f84c0..ef67d29c51 100644
--- a/source4/smb_server/smb2/receive.c
+++ b/source4/smb_server/smb2/receive.c
@@ -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);