diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-09-09 19:27:00 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-09-09 19:27:00 +0200 |
commit | c82f268a1c1c5eff1cbdb410da3c717464bdbdd7 (patch) | |
tree | 00f3aaee7050f96229d3a74b052ca1edf7e5e2b9 /source3/libsmb/async_smb.c | |
parent | 372ecdfde372a8bdd666cdf009262776eddd28d4 (diff) | |
parent | 7965249bd613eb41eeca24ba8271189e2f90257c (diff) | |
download | samba-c82f268a1c1c5eff1cbdb410da3c717464bdbdd7.tar.gz samba-c82f268a1c1c5eff1cbdb410da3c717464bdbdd7.tar.bz2 samba-c82f268a1c1c5eff1cbdb410da3c717464bdbdd7.zip |
Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit c3d1b0097590566417bda3fa33a64e994c9c7526)
Diffstat (limited to 'source3/libsmb/async_smb.c')
-rw-r--r-- | source3/libsmb/async_smb.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 435c8c1cb9..eedc7d4481 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -137,6 +137,21 @@ static int cli_request_destructor(struct cli_request *req) } /** + * Are there already requests waiting in the chain_accumulator? + * @param[in] cli The cli_state we want to check + * @retval reply :-) + */ + +bool cli_in_chain(struct cli_state *cli) +{ + if (cli->chain_accumulator == NULL) { + return false; + } + + return (cli->chain_accumulator->num_async != 0); +} + +/** * Is the SMB command able to hold an AND_X successor * @param[in] cmd The SMB command in question * @retval Can we add a chained request after "cmd"? @@ -422,7 +437,6 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev, cli_setup_packet_buf(cli, req->outbuf); req->mid = cli_new_mid(cli); - SSVAL(req->outbuf, smb_mid, req->mid); cli->chain_accumulator = req; @@ -453,6 +467,7 @@ void cli_chain_uncork(struct cli_state *cli) cli->chain_accumulator = NULL; + SSVAL(req->outbuf, smb_mid, req->mid); smb_setlen(req->outbuf, talloc_get_size(req->outbuf) - 4); cli_calculate_sign_mac(cli, req->outbuf); |