svn commit: samba r3086 - in branches/SAMBA_4_0/source/ntvfs/cifs: .

tridge at samba.org tridge at samba.org
Wed Oct 20 12:08:43 GMT 2004


Author: tridge
Date: 2004-10-20 12:08:40 +0000 (Wed, 20 Oct 2004)
New Revision: 3086

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/cifs&rev=3086&nolog=1

Log:
fixed smbpid handling in the cifs backend


Modified:
   branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c	2004-10-20 11:13:54 UTC (rev 3085)
+++ branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c	2004-10-20 12:08:40 UTC (rev 3086)
@@ -42,6 +42,8 @@
 	void *parms;
 };
 
+#define SETUP_PID private->tree->session->pid = SVAL(req->in.hdr, HDR_PID)
+
 /*
   an idle function to cope with messages from the smbd client while 
   waiting for a reply from the server
@@ -136,7 +138,7 @@
 	}
 
 	private->transport = private->tree->session->transport;
-	private->tree->session->pid = SVAL(req->in.hdr, HDR_PID);
+	SETUP_PID;
 	private->tcon = req->tcon;
 
 	tcon->fs_type = talloc_strdup(tcon, "NTFS");
@@ -209,11 +211,13 @@
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
 static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs, 
-				struct smbsrv_request *req, struct smb_unlink *unl)
+			    struct smbsrv_request *req, struct smb_unlink *unl)
 {
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	/* see if the front end will allow us to perform this
 	   function asynchronously.  */
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
@@ -245,6 +249,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	/* see if the front end will allow us to perform this
 	   function asynchronously.  */
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
@@ -265,6 +271,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_chkpath(private->tree, cp);
 	}
@@ -294,6 +302,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_pathinfo(private->tree, req, info);
 	}
@@ -323,6 +333,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_fileinfo(private->tree, req, info);
 	}
@@ -342,6 +354,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_setpathinfo(private->tree, st);
 	}
@@ -372,6 +386,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (io->generic.level != RAW_OPEN_GENERIC &&
 	    private->map_generic) {
 		return ntvfs_map_open(req, io, ntvfs);
@@ -395,6 +411,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_mkdir(private->tree, md);
 	}
@@ -413,6 +431,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_rmdir(private->tree, rd);
 	}
@@ -430,6 +450,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_rename(private->tree, ren);
 	}
@@ -468,6 +490,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (rd->generic.level != RAW_READ_GENERIC &&
 	    private->map_generic) {
 		return ntvfs_map_read(req, rd, ntvfs);
@@ -502,6 +526,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (wr->generic.level != RAW_WRITE_GENERIC &&
 	    private->map_generic) {
 		return ntvfs_map_write(req, wr, ntvfs);
@@ -525,6 +551,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_seek(private->tree, io);
 	}
@@ -543,6 +571,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_flush(private->tree, io);
 	}
@@ -561,6 +591,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (io->generic.level != RAW_CLOSE_GENERIC &&
 	    private->map_generic) {
 		return ntvfs_map_close(req, io, ntvfs);
@@ -584,6 +616,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_exit(private->tree->session);
 	}
@@ -622,6 +656,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (lck->generic.level != RAW_LOCK_GENERIC &&
 	    private->map_generic) {
 		return ntvfs_map_lock(req, lck, ntvfs);
@@ -645,6 +681,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_setfileinfo(private->tree, info);
 	}
@@ -674,6 +712,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_fsinfo(private->tree, req, fs);
 	}
@@ -702,6 +742,8 @@
 {
 	struct cvfs_private *private = ntvfs->private_data;
 
+	SETUP_PID;
+
 	return smb_raw_search_first(private->tree, req, io, search_private, callback);
 }
 
@@ -713,6 +755,8 @@
 {
 	struct cvfs_private *private = ntvfs->private_data;
 
+	SETUP_PID;
+
 	return smb_raw_search_next(private->tree, req, io, search_private, callback);
 }
 
@@ -722,6 +766,8 @@
 {
 	struct cvfs_private *private = ntvfs->private_data;
 
+	SETUP_PID;
+
 	return smb_raw_search_close(private->tree, io);
 }
 
@@ -743,6 +789,8 @@
 	struct cvfs_private *private = ntvfs->private_data;
 	struct smbcli_request *c_req;
 
+	SETUP_PID;
+
 	if (!(req->control_flags & REQ_CONTROL_MAY_ASYNC)) {
 		return smb_raw_trans2(private->tree, req, trans2);
 	}



More information about the samba-cvs mailing list