summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-28 13:15:53 +0000
committerJeremy Allison <jra@samba.org>1998-01-28 13:15:53 +0000
commit675cfd20411b7b8b61ae3e18fed3fd031f73f5cd (patch)
tree54f12482937be01f2c728d95330689e5e5df3630 /source
parent4f25e86022588aa0a065a5a01838ad3b64086dc0 (diff)
downloadsamba-675cfd20411b7b8b61ae3e18fed3fd031f73f5cd.tar.gz
samba-675cfd20411b7b8b61ae3e18fed3fd031f73f5cd.tar.xz
samba-675cfd20411b7b8b61ae3e18fed3fd031f73f5cd.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.
Diffstat (limited to 'source')
-rw-r--r--source/smbd/trans2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 139ded57b24..a9e15f65c49 100644
--- a/source/smbd/trans2.c
+++ b/source/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 */