From e525e29487dcc5e3e5a504dfae5d83def25f58e6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Jan 1998 13:11:58 +0000 Subject: 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) --- source3/smbd/trans2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') 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 */ -- cgit