svn commit: samba r24969 - in branches/SAMBA_3_2/source: include libsmb

idra at samba.org idra at samba.org
Wed Sep 5 12:54:00 GMT 2007


Author: idra
Date: 2007-09-05 12:53:56 +0000 (Wed, 05 Sep 2007)
New Revision: 24969

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

Log:

Fwd port "open" patch


Modified:
   branches/SAMBA_3_2/source/include/vfs_macros.h
   branches/SAMBA_3_2/source/libsmb/libsmb_compat.c
   branches/SAMBA_3_2/source/libsmb/libsmbclient.c


Changeset:
Modified: branches/SAMBA_3_2/source/include/vfs_macros.h
===================================================================
--- branches/SAMBA_3_2/source/include/vfs_macros.h	2007-09-05 12:53:38 UTC (rev 24968)
+++ branches/SAMBA_3_2/source/include/vfs_macros.h	2007-09-05 12:53:56 UTC (rev 24969)
@@ -46,7 +46,7 @@
 #define SMB_VFS_CLOSEDIR(conn, dir) ((conn)->vfs.ops.closedir((conn)->vfs.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs.ops.open((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_CLOSE(fsp, fd) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_READ(fsp, fd, data, n) ((fsp)->conn->vfs.ops.read((fsp)->conn->vfs.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -164,7 +164,7 @@
 #define SMB_VFS_OPAQUE_CLOSEDIR(conn, dir) ((conn)->vfs_opaque.ops.closedir((conn)->vfs_opaque.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs_opaque.ops.open((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_OPAQUE_CLOSE(fsp, fd) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_OPAQUE_READ(fsp, fd, data, n) ((fsp)->conn->vfs_opaque.ops.read((fsp)->conn->vfs_opaque.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_OPAQUE_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -283,7 +283,7 @@
 #define SMB_VFS_NEXT_CLOSEDIR(handle, dir) ((handle)->vfs_next.ops.closedir((handle)->vfs_next.handles.closedir, dir))
     
 /* File operations */
-#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) ((handle)->vfs_next.ops.open((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
 #define SMB_VFS_NEXT_CLOSE(handle, fsp, fd) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp), (fd)))
 #define SMB_VFS_NEXT_READ(handle, fsp, fd, data, n) ((handle)->vfs_next.ops.read((handle)->vfs_next.handles.read, (fsp), (fd), (data), (n)))
 #define SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (fd), (data), (n), (off)))

Modified: branches/SAMBA_3_2/source/libsmb/libsmb_compat.c
===================================================================
--- branches/SAMBA_3_2/source/libsmb/libsmb_compat.c	2007-09-05 12:53:38 UTC (rev 24968)
+++ branches/SAMBA_3_2/source/libsmb/libsmb_compat.c	2007-09-05 12:53:56 UTC (rev 24969)
@@ -156,7 +156,7 @@
 	SMBCFILE * file;
 	int fd;
 
-	file = statcont->open(statcont, furl, flags, mode);
+	file = (statcont->open)(statcont, furl, flags, mode);
 	if (!file)
 		return -1;
 

Modified: branches/SAMBA_3_2/source/libsmb/libsmbclient.c
===================================================================
--- branches/SAMBA_3_2/source/libsmb/libsmbclient.c	2007-09-05 12:53:38 UTC (rev 24968)
+++ branches/SAMBA_3_2/source/libsmb/libsmbclient.c	2007-09-05 12:53:56 UTC (rev 24969)
@@ -5971,7 +5971,7 @@
 
         /* What if the path is empty, or the file exists? */
 
-        return context->open(context, fname, O_WRONLY, 666);
+        return (context->open)(context, fname, O_WRONLY, 666);
 
 }
 
@@ -6012,7 +6012,7 @@
 
         /* Try to open the file for reading ... */
 
-        if ((long)(fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0) {
+        if ((long)(fid1 = (c_file->open)(c_file, fname, O_RDONLY, 0666)) < 0) {
                 
                 DEBUG(3, ("Error, fname=%s, errno=%i\n", fname, errno));
                 return -1;  /* smbc_open sets errno */



More information about the samba-cvs mailing list