summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/async_smb.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 24e09e0107..3b7442a680 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -310,20 +310,42 @@ bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
ofs = old_size;
+ /*
+ * Push the chained request:
+ *
+ * wct field
+ */
+
SCVAL(outbuf, ofs, wct);
ofs += 1;
+ /*
+ * vwv array
+ */
+
memcpy(outbuf + ofs, vwv, sizeof(uint16_t) * wct);
ofs += sizeof(uint16_t) * wct;
+ /*
+ * bcc (byte count)
+ */
+
SSVAL(outbuf, ofs, num_bytes + bytes_padding);
ofs += sizeof(uint16_t);
+ /*
+ * padding
+ */
+
if (bytes_padding != 0) {
memset(outbuf + ofs, 0, bytes_padding);
ofs += bytes_padding;
}
+ /*
+ * The bytes field
+ */
+
memcpy(outbuf + ofs, bytes, num_bytes);
return true;