#include "smbd/globals.h"
#include "../librpc/gen_ndr/ndr_notify.h"
+struct notify_change_event {
+ struct timespec when;
+ uint32_t action;
+ const char *name;
+};
+
struct notify_change_buf {
/*
* If no requests are pending, changes are queued here. Simple array,
* asked we just return NT_STATUS_OK without specific changes.
*/
int num_changes;
- struct notify_change *changes;
+ struct notify_change_event *changes;
/*
* If no changes are around requests are queued here. Using a linked
uint64_t mid;
};
-static bool notify_change_record_identical(struct notify_change *c1,
- struct notify_change *c2)
+static bool notify_change_record_identical(struct notify_change_event *c1,
+ struct notify_change_event *c2)
{
/* Note this is deliberately case sensitive. */
if (c1->action == c2->action &&
static bool notify_marshall_changes(int num_changes,
uint32 max_offset,
- struct notify_change *changes,
+ struct notify_change_event *changes,
DATA_BLOB *final_blob)
{
int i;
for (i=0; i<num_changes; i++) {
enum ndr_err_code ndr_err;
- struct notify_change *c;
+ struct notify_change_event *c;
struct FILE_NOTIFY_INFORMATION m;
DATA_BLOB blob;
static void notify_fsp(files_struct *fsp, uint32 action, const char *name)
{
- struct notify_change *change, *changes;
+ struct notify_change_event *change, *changes;
char *tmp;
if (fsp->notify == NULL) {
if (!(changes = talloc_realloc(
fsp->notify, fsp->notify->changes,
- struct notify_change, fsp->notify->num_changes+1))) {
+ struct notify_change_event,
+ fsp->notify->num_changes+1))) {
DEBUG(0, ("talloc_realloc failed\n"));
return;
}