s3: Remove smbd_server_conn from file_close_pid
authorVolker Lendecke <vl@samba.org>
Mon, 27 Sep 2010 01:42:36 +0000 (03:42 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 28 Sep 2010 05:36:16 +0000 (07:36 +0200)
source3/include/proto.h
source3/smbd/files.c
source3/smbd/reply.c

index c55bf8343cf0a1035b143fbe0608c3cebf01f37e..091ce17caa835273e6ff4c415062f3517c09bdda 100644 (file)
@@ -4751,7 +4751,8 @@ bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
 NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
                  files_struct **result);
 void file_close_conn(connection_struct *conn);
-void file_close_pid(uint16 smbpid, int vuid);
+void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
+                   int vuid);
 void file_init(void);
 void file_close_user(int vuid);
 struct files_struct *files_forall(
index cf6f57ea2f0c8ec4043b4b0b9c69113f60270255..f24d903daa47f983362430f4984d61a115952af6 100644 (file)
@@ -155,11 +155,12 @@ void file_close_conn(connection_struct *conn)
  Close all open files for a pid and a vuid.
 ****************************************************************************/
 
-void file_close_pid(uint16 smbpid, int vuid)
+void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
+                   int vuid)
 {
        files_struct *fsp, *next;
 
-       for (fsp=smbd_server_conn->files;fsp;fsp=next) {
+       for (fsp=sconn->files;fsp;fsp=next) {
                next = fsp->next;
                if ((fsp->file_pid == smbpid) && (fsp->vuid == vuid)) {
                        close_file(NULL, fsp, SHUTDOWN_CLOSE);
index f8c016b7f91a683ce9bc6618b64e53b28066ccb2..8663c68f96c1c829f107f6a423b30f9e9052e1bb 100644 (file)
@@ -4773,7 +4773,7 @@ void reply_exit(struct smb_request *req)
 {
        START_PROFILE(SMBexit);
 
-       file_close_pid(req->smbpid, req->vuid);
+       file_close_pid(req->sconn, req->smbpid, req->vuid);
 
        reply_outbuf(req, 0, 0);