}
/****************************************************************************
-check if a change notify should be issued
+ Check if a change notify should be issued.
+ A time of zero means instantaneous check - don't modify the last check time.
*****************************************************************************/
static BOOL hash_check_notify(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *datap, time_t t)
{
struct change_data *data = (struct change_data *)datap;
struct change_data data2;
- if (t < data->last_check_time + lp_change_notify_timeout()) return False;
+ if (t && t < data->last_check_time + lp_change_notify_timeout()) return False;
if (!become_user(conn,vuid)) return True;
if (!become_service(conn,True)) {
return True;
}
- data->last_check_time = t;
+ if (t)
+ data->last_check_time = t;
+
unbecome_user();
return False;
/****************************************************************************
-check if a change notify should be issued
+ Check if a change notify should be issued.
+ time zero means instantaneous check (used for hash). Ignore this (normal method
+ will be used instead).
*****************************************************************************/
static BOOL kernel_check_notify(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *datap, time_t t)
{
struct change_data *data = (struct change_data *)datap;
+ if (!t)
+ return False;
+
if (data->directory_handle != (int)fd_pending) return False;
DEBUG(3,("kernel change notify on %s fd=%d\n", path, (int)fd_pending));
fsp->fsp_name, new_name));
outsize = -1;
+
+ /*
+ * Win2k needs a changenotify request response before it will
+ * update after a rename..
+ */
+
+ process_pending_change_notify_queue((time_t)0);
}
return(outsize);
}
-
+
/****************************************************************************
Reply to query a security descriptor - currently this is not implemented (it
DEBUG(3,("reply_mv : %s -> %s\n",name,newname));
outsize = rename_internals(conn, inbuf, outbuf, name, newname, False);
- if(outsize == 0)
+ if(outsize == 0) {
+
+ /*
+ * Win2k needs a changenotify request response before it will
+ * update after a rename..
+ */
+
+ process_pending_change_notify_queue((time_t)0);
+
outsize = set_message(outbuf,0,0,True);
+ }
return(outsize);
}