svn commit: samba r8170 - in trunk/source/smbd: .

vlendec at samba.org vlendec at samba.org
Tue Jul 5 15:18:25 GMT 2005


Author: vlendec
Date: 2005-07-05 15:18:24 +0000 (Tue, 05 Jul 2005)
New Revision: 8170

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

Log:
More little steps... In open_file_ntcreate, BOOL add_share_mode was always
true, remove it.

Volker

Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===================================================================
--- trunk/source/smbd/open.c	2005-07-05 13:54:29 UTC (rev 8169)
+++ trunk/source/smbd/open.c	2005-07-05 15:18:24 UTC (rev 8170)
@@ -821,11 +821,11 @@
  Handle the 1 second delay in returning a SHARING_VIOLATION error.
 ****************************************************************************/
 
-void defer_open_sharing_error(connection_struct *conn,
-				struct timeval *ptv,
-				const char *fname,
-				SMB_DEV_T dev,
-				SMB_INO_T inode)
+static void defer_open_sharing_error(connection_struct *conn,
+				     struct timeval *ptv,
+				     const char *fname,
+				     SMB_DEV_T dev,
+				     SMB_INO_T inode)
 {
 	uint16 mid = get_current_mid();
 	pid_t mypid = sys_getpid();
@@ -1208,7 +1208,6 @@
 	int flags2=0;
 	BOOL file_existed = VALID_STAT(*psbuf);
 	BOOL def_acl = False;
-	BOOL add_share_mode = True;
 	BOOL internal_only_open = False;
 	SMB_DEV_T dev = 0;
 	SMB_INO_T inode = 0;
@@ -1781,9 +1780,7 @@
 		oplock_request = 0;
 	}
 
-	if (add_share_mode) {
-		set_share_mode(fsp, port, oplock_request);
-	}
+	set_share_mode(fsp, port, oplock_request);
 
 	if (create_options & FILE_DELETE_ON_CLOSE) {
 		uint32 dosattr= existing_dos_attributes;
@@ -1799,9 +1796,7 @@
 			uint8 u_e_c;
 			uint32 u_e_code;
 			/* Remember to delete the mode we just added. */
-			if (add_share_mode) {
-				del_share_mode(fsp, NULL);
-			}
+			del_share_mode(fsp, NULL);
 			unlock_share_entry_fsp(fsp);
 			fd_close(conn,fsp);
 			file_free(fsp);



More information about the samba-cvs mailing list