diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-07 16:43:33 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-15 09:07:07 +0200 |
commit | 73255d3ba912b3a112f9d766deae895f51e16cd9 (patch) | |
tree | 3d5751491ec54e384badfd95398840ce2cde28ac | |
parent | 7e2d969deb1d4bcf3add422d80852b2d386cfaac (diff) | |
download | samba-73255d3ba912b3a112f9d766deae895f51e16cd9.tar.gz samba-73255d3ba912b3a112f9d766deae895f51e16cd9.tar.bz2 samba-73255d3ba912b3a112f9d766deae895f51e16cd9.zip |
s3:libsmb: Plumb cli_smb2_list() inside cli_list().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/libsmb/clilist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index b0d3a4e6e4..ed970cd896 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -933,7 +933,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16 attribute, NTSTATUS (*fn)(const char *, struct file_info *, const char *, void *), void *state) { - TALLOC_CTX *frame = talloc_stackframe(); + TALLOC_CTX *frame = NULL; struct tevent_context *ev; struct tevent_req *req; NTSTATUS status = NT_STATUS_NO_MEMORY; @@ -941,6 +941,12 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16 attribute, size_t i, num_finfo; uint16_t info_level; + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return cli_smb2_list(cli, mask, fn, state); + } + + frame = talloc_stackframe(); + if (smbXcli_conn_has_async_calls(cli->conn)) { /* * Can't use sync call while an async call is in flight |