1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s3:libsmb: get rid of cli_has_async_calls

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Luk Claes
2012-05-26 11:45:09 +02:00
committed by Stefan Metzmacher
parent 764b5e5610
commit f7f73c4dba
12 changed files with 76 additions and 76 deletions

View 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); NTSTATUS cli_smb_req_send(struct tevent_req *req);
size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs); 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); 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); uint16_t cli_smb_req_mid(struct tevent_req *req);
void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid); void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid);
uint32_t cli_smb_req_seqnum(struct tevent_req *req); uint32_t cli_smb_req_seqnum(struct tevent_req *req);

View 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); 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);
}

View File

@ -314,7 +314,7 @@ static NTSTATUS cli_session_setup_lanman2(struct cli_state *cli, const char *use
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
ADS_STATUS status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY); 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); return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
} }
ev = tevent_context_init(talloc_tos()); ev = tevent_context_init(talloc_tos());
@ -1823,7 +1823,7 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(talloc_tos()); ev = tevent_context_init(talloc_tos());
@ -2198,7 +2198,7 @@ NTSTATUS cli_ulogoff(struct cli_state *cli)
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(talloc_tos()); 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(talloc_tos()); ev = tevent_context_init(talloc_tos());

View File

@ -546,7 +546,7 @@ NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data)
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(mem_ctx); ev = tevent_context_init(mem_ctx);

View File

@ -27,6 +27,7 @@
#include "trans2.h" #include "trans2.h"
#include "ntioctl.h" #include "ntioctl.h"
#include "libcli/security/secdesc.h" #include "libcli/security/secdesc.h"
#include "../libcli/smb/smbXcli_base.h"
/*********************************************************** /***********************************************************
Common function for pushing stings, used by smb_bytes_push_str() 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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); 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; char *path2 = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req = NULL;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * Can't use sync call while an async call is in flight
*/ */

View File

@ -129,7 +129,7 @@ NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(talloc_tos()); 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; return NT_STATUS_INVALID_PARAMETER;
} }
ev = tevent_context_init(talloc_tos()); ev = tevent_context_init(talloc_tos());

View File

@ -22,6 +22,7 @@
#include "../lib/util/tevent_ntstatus.h" #include "../lib/util/tevent_ntstatus.h"
#include "async_smb.h" #include "async_smb.h"
#include "trans2.h" #include "trans2.h"
#include "../libcli/smb/smbXcli_base.h"
/**************************************************************************** /****************************************************************************
Calculate a safe next_entry_offset. 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; struct file_info *finfo;
size_t i, num_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 * 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; struct file_info *finfo = NULL;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; size_t i, num_finfo;
uint16_t info_level; 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 * Can't use sync call while an async call is in flight
*/ */

View File

@ -21,6 +21,7 @@
#include "../lib/util/tevent_ntstatus.h" #include "../lib/util/tevent_ntstatus.h"
#include "async_smb.h" #include "async_smb.h"
#include "libsmb/libsmb.h" #include "libsmb/libsmb.h"
#include "../libcli/smb/smbXcli_base.h"
struct cli_message_start_state { struct cli_message_start_state {
uint16_t grp; uint16_t grp;
@ -388,7 +389,7 @@ NTSTATUS cli_message(struct cli_state *cli, const char *host,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * Can't use sync call while an async call is in flight
*/ */

View File

@ -28,6 +28,7 @@
#include "libsmb/libsmb.h" #include "libsmb/libsmb.h"
#include "libsmb/clirap.h" #include "libsmb/clirap.h"
#include "trans2.h" #include "trans2.h"
#include "../libcli/smb/smbXcli_base.h"
#define PIPE_LANMAN "\\PIPE\\LANMAN" #define PIPE_LANMAN "\\PIPE\\LANMAN"
@ -670,7 +671,7 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * Can't use sync call while an async call is in flight
*/ */

View File

@ -22,6 +22,7 @@
#include "../lib/util/tevent_ntstatus.h" #include "../lib/util/tevent_ntstatus.h"
#include "async_smb.h" #include "async_smb.h"
#include "trans2.h" #include "trans2.h"
#include "../libcli/smb/smbXcli_base.h"
/**************************************************************************** /****************************************************************************
Calculate the recommended read buffer size Calculate the recommended read buffer size
@ -687,7 +688,7 @@ NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK; 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 * Can't use sync call while an async call is in flight
*/ */

View File

@ -26,6 +26,7 @@
#include "trans2.h" #include "trans2.h"
#include "libcli/security/secdesc.h" #include "libcli/security/secdesc.h"
#include "libcli/security/security.h" #include "libcli/security/security.h"
#include "../libcli/smb/smbXcli_base.h"
struct cli_symlink_state { struct cli_symlink_state {
struct tevent_context *ev; struct tevent_context *ev;
@ -204,7 +205,7 @@ NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; status = NT_STATUS_INVALID_PARAMETER;
goto fail; goto fail;
} }
@ -378,7 +379,7 @@ NTSTATUS cli_readlink(struct cli_state *cli, const char *fname,
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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; status = NT_STATUS_INVALID_PARAMETER;
goto fail; goto fail;
} }

View File

@ -145,7 +145,7 @@ NTSTATUS smb2cli_tcon(struct cli_state *cli, const char *share)
struct tevent_req *req; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * 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; struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY; 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 * Can't use sync call while an async call is in flight
*/ */