summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorLuk Claes <luk@debian.org>2012-05-26 11:45:09 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-28 14:49:50 +0200
commitf7f73c4dbad4dc47e3f37cd09f90470c2e54a4c2 (patch)
tree4fb1a5c145e6f936e38d1f51c8090055c438c166 /source3/libsmb/clifile.c
parent764b5e56108362a53acf8f435203dd1e56ecd2ce (diff)
downloadsamba-f7f73c4dbad4dc47e3f37cd09f90470c2e54a4c2.tar.gz
samba-f7f73c4dbad4dc47e3f37cd09f90470c2e54a4c2.tar.bz2
samba-f7f73c4dbad4dc47e3f37cd09f90470c2e54a4c2.zip
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>
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r--source3/libsmb/clifile.c83
1 files changed, 42 insertions, 41 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 963f553144..b38b2e89be 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -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
*/