1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-24 10:50:22 +03:00

s3:smbd: add a smbd_notify_cancel_by_map() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2015-05-01 20:04:55 +02:00 committed by Jeremy Allison
parent e8081af2c7
commit 2c47fb1608

View File

@ -375,6 +375,17 @@ static void change_notify_remove_request(struct smbd_server_connection *sconn,
TALLOC_FREE(req);
}
static void smbd_notify_cancel_by_map(struct notify_mid_map *map)
{
struct smb_request *smbreq = map->req->req;
struct smbd_server_connection *sconn = smbreq->sconn;
NTSTATUS notify_status = NT_STATUS_CANCELLED;
change_notify_reply(smbreq, notify_status,
0, NULL, map->req->reply_fn);
change_notify_remove_request(sconn, map->req);
}
/****************************************************************************
Delete entries by mid from the change notify pending queue. Always send reply.
*****************************************************************************/
@ -394,9 +405,7 @@ void remove_pending_change_notify_requests_by_mid(
return;
}
change_notify_reply(map->req->req,
NT_STATUS_CANCELLED, 0, NULL, map->req->reply_fn);
change_notify_remove_request(sconn, map->req);
smbd_notify_cancel_by_map(map);
}
void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq)
@ -414,9 +423,7 @@ void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq)
return;
}
change_notify_reply(map->req->req,
NT_STATUS_CANCELLED, 0, NULL, map->req->reply_fn);
change_notify_remove_request(sconn, map->req);
smbd_notify_cancel_by_map(map);
}
static struct files_struct *smbd_notify_cancel_deleted_fn(