From dc962c195e24a6323295a596fe864d3bc245b66b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 5 Jun 2012 09:36:36 +0200 Subject: s3:smbd: add change_notify_fsp_has_changes() metze --- source3/smbd/notify.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3/smbd/notify.c') diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 0401b65a6a..a55be9b938 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -39,6 +39,23 @@ struct notify_change_request { static void notify_fsp(files_struct *fsp, uint32 action, const char *name); +bool change_notify_fsp_has_changes(struct files_struct *fsp) +{ + if (fsp == NULL) { + return false; + } + + if (fsp->notify == NULL) { + return false; + } + + if (fsp->notify->num_changes == 0) { + return false; + } + + return true; +} + /* * For NTCancel, we need to find the notify_change_request indexed by * mid. Separate list here. -- cgit