summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clireadwrite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index b68484a905..c714d3b273 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -81,7 +81,7 @@ static size_t cli_write_max_bufsize(struct cli_state *cli,
data_offset += wct * sizeof(uint16_t);
data_offset += 1; /* pad */
- useable_space = cli->max_xmit - data_offset;
+ useable_space = cli_state_available_size(cli, data_offset);
return useable_space;
}