svn commit: samba r14947 - in branches/SAMBA_4_0/source/ntvfs/posix: .

tridge at samba.org tridge at samba.org
Thu Apr 6 11:07:23 GMT 2006


Author: tridge
Date: 2006-04-06 11:07:21 +0000 (Thu, 06 Apr 2006)
New Revision: 14947

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14947

Log:

add support for file truncate events

Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c	2006-04-06 11:06:28 UTC (rev 14946)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c	2006-04-06 11:07:21 UTC (rev 14947)
@@ -400,7 +400,7 @@
 			if (ret == -1) {
 				return pvfs_map_errno(pvfs, errno);
 			}
-			change_mask |= FILE_NOTIFY_CHANGE_SIZE;
+			change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
 		}
 	}
 
@@ -580,6 +580,7 @@
 		} else if (truncate(name->full_name, newstats.st.st_size) == -1) {
 			return pvfs_map_errno(pvfs, errno);
 		}
+		change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
 	}
 
 	/* possibly change the file timestamps */
@@ -613,10 +614,12 @@
 
 	*name = newstats;
 
-	notify_trigger(pvfs->notify_context, 
-		       NOTIFY_ACTION_MODIFIED, 
-		       change_mask,
-		       name->full_name);
+	if (change_mask != 0) {
+		notify_trigger(pvfs->notify_context, 
+			       NOTIFY_ACTION_MODIFIED, 
+			       change_mask,
+			       name->full_name);
+	}
 
 	return pvfs_dosattrib_save(pvfs, name, -1);
 }



More information about the samba-cvs mailing list