summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-23 22:32:49 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-24 22:20:06 +0200
commit51af8b9600630e2310f0dc2780a06f24b88f3cb5 (patch)
tree2bb55c8b4b8fa3e6c63500b7ce13be72d4d43667 /libcli
parent370e7140bb67f84b87e17e2e83076a94b430916e (diff)
downloadsamba-51af8b9600630e2310f0dc2780a06f24b88f3cb5.tar.gz
samba-51af8b9600630e2310f0dc2780a06f24b88f3cb5.tar.bz2
samba-51af8b9600630e2310f0dc2780a06f24b88f3cb5.zip
libcli/smb: pass smbXcli_tcon to smb2cli_query_directory*()
metze
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smb2cli_query_directory.c12
-rw-r--r--libcli/smb/smbXcli_base.h4
2 files changed, 11 insertions, 5 deletions
diff --git a/libcli/smb/smb2cli_query_directory.c b/libcli/smb/smb2cli_query_directory.c
index efc52d1ea7..4ff93de68d 100644
--- a/libcli/smb/smb2cli_query_directory.c
+++ b/libcli/smb/smb2cli_query_directory.c
@@ -38,7 +38,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint8_t level,
uint8_t flags,
uint32_t file_index,
@@ -52,6 +52,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
uint8_t *fixed;
uint8_t *dyn;
size_t dyn_len;
+ uint32_t tcon_id = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_query_directory_state);
@@ -87,6 +88,10 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
dyn_len = sizeof(state->dyn_pad);
}
+ if (tcon) {
+ tcon_id = smb2cli_tcon_current_id(tcon);
+ }
+
subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FIND,
0, 0, /* flags */
timeout_msec,
@@ -162,7 +167,7 @@ NTSTATUS smb2cli_query_directory_recv(struct tevent_req *req,
NTSTATUS smb2cli_query_directory(struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint8_t level,
uint8_t flags,
uint32_t file_index,
@@ -191,7 +196,8 @@ NTSTATUS smb2cli_query_directory(struct smbXcli_conn *conn,
goto fail;
}
req = smb2cli_query_directory_send(frame, ev, conn, timeout_msec,
- session, tcon_id, level, flags,
+ session, tcon,
+ level, flags,
file_index, fid_persistent,
fid_volatile, mask, outbuf_len);
if (req == NULL) {
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 75948be6fb..9230c7ee4e 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -500,7 +500,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint8_t level,
uint8_t flags,
uint32_t file_index,
@@ -515,7 +515,7 @@ NTSTATUS smb2cli_query_directory_recv(struct tevent_req *req,
NTSTATUS smb2cli_query_directory(struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint8_t level,
uint8_t flags,
uint32_t file_index,