From 5005a3a6961d40fe349f76db67c980be7dc9f3ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 25 Jul 2017 12:30:47 +0200 Subject: libsmb: Enable "cli_notify" for SMB2+ Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jul 26 01:33:25 CEST 2017 on sn-devel-144 --- source3/libsmb/clifile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 1455fbdbdfd..828448f2d5a 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -5602,11 +5602,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 -- cgit v1.2.1