s3:libsmb: get rid of cli_has_async_calls
authorLuk Claes <luk@debian.org>
Sat, 26 May 2012 09:45:09 +0000 (11:45 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 28 May 2012 12:49:50 +0000 (14:49 +0200)
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 files changed:
source3/include/async_smb.h
source3/libsmb/async_smb.c
source3/libsmb/cliconnect.c
source3/libsmb/clientgen.c
source3/libsmb/clifile.c
source3/libsmb/clifsinfo.c
source3/libsmb/clilist.c
source3/libsmb/climessage.c
source3/libsmb/clirap.c
source3/libsmb/clireadwrite.c
source3/libsmb/clisymlink.c
source3/libsmb/smb2cli_tcon.c

index 869d33226ef276c519c7f2b4f6ad10c5d763bd31..121a6ec326b6b0012e24bcc0dd7389c1a25459fa 100644 (file)
@@ -33,7 +33,6 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx,
 NTSTATUS cli_smb_req_send(struct tevent_req *req);
 size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs);
 NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs);
-bool cli_has_async_calls(struct cli_state *cli);
 uint16_t cli_smb_req_mid(struct tevent_req *req);
 void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid);
 uint32_t cli_smb_req_seqnum(struct tevent_req *req);
index 2d4d3fed60021f4df68350935b3ae95fc76fd4bf..62aaa5646c8ab8d98e3a32df8e364ad25eb70f4d 100644 (file)
@@ -318,8 +318,3 @@ NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs)
 {
        return smb1cli_req_chain_submit(reqs, num_reqs);
 }
-
-bool cli_has_async_calls(struct cli_state *cli)
-{
-       return smbXcli_conn_has_async_calls(cli->conn);
-}
index 491b7039f954f409b9a6a09c25aadffebd32ae19..5b4c1404400bbccc64d0c174136e68f7b8e967de 100644 (file)
@@ -314,7 +314,7 @@ static NTSTATUS cli_session_setup_lanman2(struct cli_state *cli, const char *use
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -551,7 +551,7 @@ static NTSTATUS cli_session_setup_guest(struct cli_state *cli)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -756,7 +756,7 @@ static NTSTATUS cli_session_setup_plain(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1113,7 +1113,7 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state *cli, const char *user,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1556,7 +1556,7 @@ static ADS_STATUS cli_session_setup_kerberos(struct cli_state *cli,
        struct tevent_req *req;
        ADS_STATUS status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
        }
        ev = tevent_context_init(talloc_tos());
@@ -1823,7 +1823,7 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
        ev = tevent_context_init(talloc_tos());
@@ -2198,7 +2198,7 @@ NTSTATUS cli_ulogoff(struct cli_state *cli)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
        ev = tevent_context_init(talloc_tos());
@@ -2480,7 +2480,7 @@ NTSTATUS cli_tcon_andx(struct cli_state *cli, const char *share,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2586,7 +2586,7 @@ NTSTATUS cli_tdis(struct cli_state *cli)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
        ev = tevent_context_init(talloc_tos());
index d4138e9172794b00f572e2b33a662009b49dd639..58ccff9f9732686a7d0d36a489a2e4c1503d01e9 100644 (file)
@@ -546,7 +546,7 @@ NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -614,7 +614,7 @@ NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli,
         struct tevent_req *req = NULL;
         NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-        if (cli_has_async_calls(cli)) {
+        if (smbXcli_conn_has_async_calls(cli->conn)) {
                 return NT_STATUS_INVALID_PARAMETER;
         }
         ev = tevent_context_init(mem_ctx);
index 963f55314485d883b3b8ba7f4b44829427aca976..b38b2e89be5f165515fc63129b476d049e8da2b1 100644 (file)
@@ -27,6 +27,7 @@
 #include "trans2.h"
 #include "ntioctl.h"
 #include "libcli/security/secdesc.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 /***********************************************************
  Common function for pushing stings, used by smb_bytes_push_str()
@@ -244,7 +245,7 @@ NTSTATUS cli_setpathinfo(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -347,7 +348,7 @@ NTSTATUS cli_posix_symlink(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -488,7 +489,7 @@ NTSTATUS cli_posix_readlink(struct cli_state *cli, const char *fname,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -552,7 +553,7 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -664,7 +665,7 @@ NTSTATUS cli_posix_getfacl(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -795,7 +796,7 @@ NTSTATUS cli_posix_stat(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -908,7 +909,7 @@ NTSTATUS cli_posix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -977,7 +978,7 @@ NTSTATUS cli_posix_chown(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1101,7 +1102,7 @@ NTSTATUS cli_rename(struct cli_state *cli, const char *fname_src, const char *fn
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1242,7 +1243,7 @@ NTSTATUS cli_ntrename(struct cli_state *cli, const char *fname_src, const char *
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1304,7 +1305,7 @@ NTSTATUS cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const cha
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1411,7 +1412,7 @@ NTSTATUS cli_unlink(struct cli_state *cli, const char *fname, uint16_t mayhave_a
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1515,7 +1516,7 @@ NTSTATUS cli_mkdir(struct cli_state *cli, const char *dname)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1619,7 +1620,7 @@ NTSTATUS cli_rmdir(struct cli_state *cli, const char *dname)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1729,7 +1730,7 @@ NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1893,7 +1894,7 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2078,7 +2079,7 @@ NTSTATUS cli_nttrans_create(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2274,7 +2275,7 @@ NTSTATUS cli_openx(struct cli_state *cli, const char *fname, int flags,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2504,7 +2505,7 @@ NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2614,7 +2615,7 @@ NTSTATUS cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2791,7 +2792,7 @@ NTSTATUS cli_unlock(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -2960,7 +2961,7 @@ NTSTATUS cli_unlock64(struct cli_state *cli,
                return cli_unlock(cli, fnum, offset, len);
        }
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3120,7 +3121,7 @@ NTSTATUS cli_posix_lock(struct cli_state *cli, uint16_t fnum,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3191,7 +3192,7 @@ NTSTATUS cli_posix_unlock(struct cli_state *cli, uint16_t fnum, uint64_t offset,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3342,7 +3343,7 @@ NTSTATUS cli_getattrE(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3490,7 +3491,7 @@ NTSTATUS cli_getatr(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3599,7 +3600,7 @@ NTSTATUS cli_setattrE(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3728,7 +3729,7 @@ NTSTATUS cli_setatr(struct cli_state *cli,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3833,7 +3834,7 @@ NTSTATUS cli_chkpath(struct cli_state *cli, const char *path)
        char *path2 = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -3958,7 +3959,7 @@ NTSTATUS cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4112,7 +4113,7 @@ NTSTATUS cli_ctemp(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4451,7 +4452,7 @@ NTSTATUS cli_get_ea_list_path(struct cli_state *cli, const char *path,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4664,7 +4665,7 @@ NTSTATUS cli_posix_open(struct cli_state *cli, const char *fname,
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4723,7 +4724,7 @@ NTSTATUS cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4829,7 +4830,7 @@ NTSTATUS cli_posix_unlink(struct cli_state *cli, const char *fname)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -4890,7 +4891,7 @@ NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname)
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -5087,7 +5088,7 @@ NTSTATUS cli_notify(struct cli_state *cli, uint16_t fnum, uint32_t buffer_size,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -5225,7 +5226,7 @@ NTSTATUS cli_qpathinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -5362,7 +5363,7 @@ NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -5442,7 +5443,7 @@ NTSTATUS cli_flush(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -5587,7 +5588,7 @@ NTSTATUS cli_shadow_copy_data(TALLOC_CTX *mem_ctx, struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
index e4d3c76324322206013852466b9df81f812bf20a..5a75161e3a67c155d2f3c9d159ce976310f61345 100644 (file)
@@ -129,7 +129,7 @@ NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -242,7 +242,7 @@ NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
        ev = tevent_context_init(talloc_tos());
@@ -339,7 +339,7 @@ NTSTATUS cli_get_fs_attr_info(struct cli_state *cli, uint32_t *fs_attr)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
        ev = tevent_context_init(talloc_tos());
index ce3fb272974b1b63a69fda0054cdc50e59b7c802..f8e8994e4aeb5045803f42c0e1deb39ef25d78f5 100644 (file)
@@ -22,6 +22,7 @@
 #include "../lib/util/tevent_ntstatus.h"
 #include "async_smb.h"
 #include "trans2.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 /****************************************************************************
  Calculate a safe next_entry_offset.
@@ -487,7 +488,7 @@ NTSTATUS cli_list_old(struct cli_state *cli, const char *mask,
        struct file_info *finfo;
        size_t i, num_finfo;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -822,7 +823,7 @@ NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
        struct file_info *finfo = NULL;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -938,7 +939,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16 attribute,
        size_t i, num_finfo;
        uint16_t info_level;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
index 55ffd8d9a59946385868e8c6cbf1dcdae9c8a768..6c562fa29033f1b17160b272c0a74b042abfc437 100644 (file)
@@ -21,6 +21,7 @@
 #include "../lib/util/tevent_ntstatus.h"
 #include "async_smb.h"
 #include "libsmb/libsmb.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 struct cli_message_start_state {
        uint16_t grp;
@@ -388,7 +389,7 @@ NTSTATUS cli_message(struct cli_state *cli, const char *host,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
index 175fa3e6a1c6a7d33e5e51a2663d9045b879bbe7..db2d7c059c43c52d48d5f333d452e415380b9fd2 100644 (file)
@@ -28,6 +28,7 @@
 #include "libsmb/libsmb.h"
 #include "libsmb/clirap.h"
 #include "trans2.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
 
@@ -670,7 +671,7 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -845,7 +846,7 @@ NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -956,7 +957,7 @@ NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1244,7 +1245,7 @@ NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
index 7f827727210f8e1c74ade95a62fef472d61e633a..758521f7bc930619c74635e5cc0f51c5c947a019 100644 (file)
@@ -22,6 +22,7 @@
 #include "../lib/util/tevent_ntstatus.h"
 #include "async_smb.h"
 #include "trans2.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 /****************************************************************************
   Calculate the recommended read buffer size
@@ -687,7 +688,7 @@ NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1074,7 +1075,7 @@ NTSTATUS cli_writeall(struct cli_state *cli, uint16_t fnum, uint16_t mode,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -1303,7 +1304,7 @@ NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_OK;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
index 9e21d1b88372ad0080c6de29b142121dbe0aeb78..d0a2deb35549c1d707f6038b47c97bc147532121 100644 (file)
@@ -26,6 +26,7 @@
 #include "trans2.h"
 #include "libcli/security/secdesc.h"
 #include "libcli/security/security.h"
+#include "../libcli/smb/smbXcli_base.h"
 
 struct cli_symlink_state {
        struct tevent_context *ev;
@@ -204,7 +205,7 @@ NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                status = NT_STATUS_INVALID_PARAMETER;
                goto fail;
        }
@@ -378,7 +379,7 @@ NTSTATUS cli_readlink(struct cli_state *cli, const char *fname,
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                status = NT_STATUS_INVALID_PARAMETER;
                goto fail;
        }
index c3f8fcc441ed661a4914438663e51d3e9a51b2d2..b56a40282a58cddf07527572ed0b187803db7dd5 100644 (file)
@@ -145,7 +145,7 @@ NTSTATUS smb2cli_tcon(struct cli_state *cli, const char *share)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */
@@ -244,7 +244,7 @@ NTSTATUS smb2cli_tdis(struct cli_state *cli)
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
-       if (cli_has_async_calls(cli)) {
+       if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight
                 */