diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 11:23:49 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-13 13:16:07 +0200 |
commit | 2a5f8daa3e2563166413af75e53c8c2b90d22d8c (patch) | |
tree | f2883207cb45d3b1c91ee41d942b44c645486433 /source3/libsmb/clientgen.c | |
parent | 58482494fd58cd364ee80ce77fe75b7deccb26b4 (diff) | |
download | samba-2a5f8daa3e2563166413af75e53c8c2b90d22d8c.tar.gz samba-2a5f8daa3e2563166413af75e53c8c2b90d22d8c.tar.xz samba-2a5f8daa3e2563166413af75e53c8c2b90d22d8c.zip |
s3:libsmb: add cli_state_available_size()
metze
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r-- | source3/libsmb/clientgen.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index f274dc0b63..21ecab840a 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -501,6 +501,19 @@ uint32_t cli_state_capabilities(struct cli_state *cli) return cli->capabilities; } +uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs) +{ + uint32_t ret = cli->max_xmit; + + if (ofs >= ret) { + return 0; + } + + ret -= ofs; + + return ret; +} + struct cli_echo_state { uint16_t vwv[1]; DATA_BLOB data; |