summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-28 13:11:58 +0000
committerJeremy Allison <jra@samba.org>1998-01-28 13:11:58 +0000
commite525e29487dcc5e3e5a504dfae5d83def25f58e6 (patch)
tree78005ae7d63b1e7686f2f4a7e3ad358109bbe400 /source3
parentb5eb6899b440e7b1b5e801dc5f42cef1595b69e0 (diff)
downloadsamba-e525e29487dcc5e3e5a504dfae5d83def25f58e6.tar.gz
samba-e525e29487dcc5e3e5a504dfae5d83def25f58e6.tar.bz2
samba-e525e29487dcc5e3e5a504dfae5d83def25f58e6.zip
Fix from Charles Hoch (hoch@hpl.hp.com). Whne there is no data
to send, setting the data alignment to a 4 byte boundary causes a few extra bytes to be sent. This seems to cause the NT redirector to *sometimes* fail. Jeremy. (This used to be commit f6ee3263dac960772024bf9009ad0ddce6d8f289)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 139ded57b2..a9e15f65c4 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -70,8 +70,10 @@ static int send_trans2_replies(char *outbuf, int bufsize, char *params,
return 0;
}
- /* when sending params and data ensure that both are nicely aligned */
- if ((params_to_send % 4) != 0)
+ /* When sending params and data ensure that both are nicely aligned */
+ /* Only do this alignment when there is also data to send - else
+ can cause NT redirector problems. */
+ if (((params_to_send % 4) != 0) && (data_to_send != 0))
data_alignment_offset = 4 - (params_to_send % 4);
/* Space is bufsize minus Netbios over TCP header minus SMB header */