Delete entries by mid from the change notify pending queue. Always send reply.
*****************************************************************************/
-void remove_pending_change_notify_requests_by_mid(
+bool remove_pending_change_notify_requests_by_mid(
struct smbd_server_connection *sconn, uint64_t mid)
{
struct notify_mid_map *map;
}
if (map == NULL) {
- return;
+ return false;
}
smbd_notify_cancel_by_map(map);
+ return true;
}
void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq)
{
struct smbXsrv_connection *xconn = req->xconn;
struct smbd_server_connection *sconn = req->sconn;
+ bool found;
/*
* Go through and cancel any pending change notifies.
START_PROFILE(SMBntcancel);
srv_cancel_sign_response(xconn);
- remove_pending_change_notify_requests_by_mid(sconn, req->mid);
- remove_pending_lock_requests_by_mid_smb1(sconn, req->mid);
+ found = remove_pending_change_notify_requests_by_mid(sconn, req->mid);
+ if (!found) {
+ remove_pending_lock_requests_by_mid_smb1(sconn, req->mid);
+ }
DEBUG(3,("reply_ntcancel: cancel called on mid = %llu.\n",
(unsigned long long)req->mid));
void smbd_notifyd_restarted(struct messaging_context *msg,
void *private_data, uint32_t msg_type,
struct server_id server_id, DATA_BLOB *data);
-void remove_pending_change_notify_requests_by_mid(
+bool remove_pending_change_notify_requests_by_mid(
struct smbd_server_connection *sconn, uint64_t mid);
void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
NTSTATUS status);