diff options
author | Volker Lendecke <vl@samba.org> | 2017-07-25 12:30:47 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-04-20 11:53:10 +0200 |
commit | 3c3746fc05d80fab374ac9a2b819cc61a5990b0d (patch) | |
tree | 144889da261c4022df392624d2f805e91e6aa9e3 /source3/libsmb | |
parent | 41666d5992a2a8a15cd46069c88792310eb2af78 (diff) | |
download | samba-3c3746fc05d80fab374ac9a2b819cc61a5990b0d.tar.gz |
libsmb: Enable "cli_notify" for SMB2+
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13382
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 26 01:33:25 CEST 2017 on sn-devel-144
(cherry picked from commit 5005a3a6961d40fe349f76db67c980be7dc9f3ea)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clifile.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 3fc0b8c2b8c..e942b27e175 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -5609,11 +5609,19 @@ NTSTATUS cli_notify(struct cli_state *cli, uint16_t fnum, uint32_t buffer_size, TALLOC_CTX *mem_ctx, uint32_t *pnum_changes, struct notify_change **pchanges) { - TALLOC_CTX *frame = talloc_stackframe(); + TALLOC_CTX *frame; struct tevent_context *ev; struct tevent_req *req; NTSTATUS status = NT_STATUS_NO_MEMORY; + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return cli_smb2_notify(cli, fnum, buffer_size, + completion_filter, recursive, + mem_ctx, pchanges, pnum_changes); + } + + frame = talloc_stackframe(); + if (smbXcli_conn_has_async_calls(cli->conn)) { /* * Can't use sync call while an async call is in flight |