summaryrefslogtreecommitdiff
path: root/source3/smbd/notify.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-15 10:07:00 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-17 09:25:45 +0200
commit47452b8cecaa9ad17d88e259a9972c5ddd007629 (patch)
tree465aa7b5217406e10ba519c65b944402312a88c2 /source3/smbd/notify.c
parentd60f049eaf30d7a717291b2f295cc889efc7afa9 (diff)
downloadsamba-47452b8cecaa9ad17d88e259a9972c5ddd007629.tar.gz
samba-47452b8cecaa9ad17d88e259a9972c5ddd007629.tar.bz2
samba-47452b8cecaa9ad17d88e259a9972c5ddd007629.zip
s3:smbd: add smbd_notify_cancel_by_smbreq()
This function will be used by the SMB2 notify code. metze
Diffstat (limited to 'source3/smbd/notify.c')
-rw-r--r--source3/smbd/notify.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 8f37923865..e430fcfc04 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -317,6 +317,26 @@ void remove_pending_change_notify_requests_by_mid(uint16 mid)
change_notify_remove_request(map->req);
}
+void smbd_notify_cancel_by_smbreq(struct smbd_server_connection *sconn,
+ const struct smb_request *smbreq)
+{
+ struct notify_mid_map *map;
+
+ for (map = sconn->smb1.notify_mid_maps; map; map = map->next) {
+ if (map->req->req == smbreq) {
+ break;
+ }
+ }
+
+ if (map == NULL) {
+ return;
+ }
+
+ change_notify_reply(map->req->fsp->conn, map->req->req,
+ NT_STATUS_CANCELLED, 0, NULL, map->req->reply_fn);
+ change_notify_remove_request(map->req);
+}
+
/****************************************************************************
Delete entries by fnum from the change notify pending queue.
*****************************************************************************/