name_compare_entry *aio_write_behind_list; /* Per-share list of files to use aio write behind on. */
struct dfree_cached_info *dfree_info;
struct trans_state *pending_trans;
- struct notify_context *notify_ctx;
struct rpc_pipe_client *spoolss_pipe;
}
if (fsp->notify) {
+ struct notify_context *notify_ctx =
+ fsp->conn->sconn->notify_ctx;
if (fsp->is_directory) {
- notify_remove_onelevel(fsp->conn->notify_ctx,
+ notify_remove_onelevel(notify_ctx,
&fsp->file_id, fsp);
}
- notify_remove(fsp->conn->notify_ctx, fsp);
+ notify_remove(notify_ctx, fsp);
TALLOC_FREE(fsp->notify);
}
e.subdir_filter = filter;
}
- status = notify_add(fsp->conn->notify_ctx, fsp->conn, &e,
+ status = notify_add(fsp->conn->sconn->notify_ctx, fsp->conn, &e,
notify_callback, fsp);
TALLOC_FREE(fullpath);
void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
const char *path)
{
+ struct notify_context *notify_ctx = conn->sconn->notify_ctx;
char *fullpath;
char *parent;
const char *name;
smb_fname_parent.base_name = parent;
if (SMB_VFS_STAT(conn, &smb_fname_parent) != -1) {
- notify_onelevel(conn->notify_ctx, action, filter,
+ notify_onelevel(notify_ctx, action, filter,
SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st),
name);
}
DEBUG(0, ("asprintf failed\n"));
return;
}
- notify_trigger(conn->notify_ctx, action, filter, fullpath);
+ notify_trigger(notify_ctx, action, filter, fullpath);
TALLOC_FREE(fullpath);
}
on_err_call_dis_hook = true;
if ((!conn->printer) && (!conn->ipc) &&
- lp_change_notify(conn->params)) {
- conn->notify_ctx = notify_init(conn,
- sconn->msg_ctx,
- sconn->ev_ctx);
+ lp_change_notify(conn->params) &&
+ sconn->notify_ctx == NULL) {
+ sconn->notify_ctx = notify_init(sconn,
+ sconn->msg_ctx,
+ sconn->ev_ctx);
}
/*