diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-19 16:10:08 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-19 16:13:26 +0100 |
commit | 98c4055bcba17cde81345947d61fa2faae108654 (patch) | |
tree | ee09d7d55923958e4287e93f9d83ef2f4a609a63 /source3/libsmb | |
parent | af049ae83c5640016e912e9e839653df2946fa98 (diff) | |
download | samba-98c4055bcba17cde81345947d61fa2faae108654.tar.gz samba-98c4055bcba17cde81345947d61fa2faae108654.tar.bz2 samba-98c4055bcba17cde81345947d61fa2faae108654.zip |
Add some comments
If it takes more than 10 seconds to understand the code you've written yourself
less than a year ago, it's time for comments or refactoring. I couldn't find a
way to refactor that cleanly, so add comments :-)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/async_smb.c | 22 |
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; |