diff options
author | Jeremy Allison <jra@samba.org> | 2000-01-14 23:50:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-01-14 23:50:38 +0000 |
commit | eb06c199163232453e2d9ca50d00765c90f8f3e2 (patch) | |
tree | 202ecbc28f0c32e90a1ab43b6fae0a04c1316603 | |
parent | fd8582cc0a751618f4699f435d561f5de54bf7f4 (diff) | |
download | samba-eb06c199163232453e2d9ca50d00765c90f8f3e2.tar.gz samba-eb06c199163232453e2d9ca50d00765c90f8f3e2.tar.xz samba-eb06c199163232453e2d9ca50d00765c90f8f3e2.zip |
useable_space does not include the alignment offset calculations.
Bugfix from Marc_Jacobsen@hp.com.
Jeremy.
-rw-r--r-- | source/smbd/trans2.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 896200059fc..4b774a4ed18 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -95,7 +95,14 @@ static int send_trans2_replies(char *outbuf, int bufsize, char *params, total_sent_thistime = params_to_send + data_to_send + alignment_offset + data_alignment_offset; /* We can never send more than useable_space */ - total_sent_thistime = MIN(total_sent_thistime, useable_space); + /* + * Note that 'useable_space' does not include the alignment offsets, + * but we must include the alignment offsets in the calculation of + * the length of the data we send over the wire, as the alignment offsets + * are sent here. Fix from Marc_Jacobsen@hp.com. + */ + total_sent_thistime = MIN(total_sent_thistime, useable_space + + alignment_offset + data_alignment_offset); set_message(outbuf, 10, total_sent_thistime, True); |