Skip to content

Commit

Permalink
s3:smbd: add change_notify_fsp_has_changes()
Browse files Browse the repository at this point in the history
metze
  • Loading branch information
metze-samba committed Jun 6, 2012
1 parent d1d7904 commit dc962c1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source3/smbd/notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions source3/smbd/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ void reply_negprot(struct smb_request *req);

/* The following definitions come from smbd/notify.c */

bool change_notify_fsp_has_changes(struct files_struct *fsp);
void change_notify_reply(struct smb_request *req,
NTSTATUS error_code,
uint32_t max_param,
Expand Down

0 comments on commit dc962c1

Please sign in to comment.