Ensure we only ever set fsp->conn in one place.
authorJeremy Allison <jra@samba.org>
Tue, 4 Feb 2003 01:43:10 +0000 (01:43 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 4 Feb 2003 01:43:10 +0000 (01:43 +0000)
Jeremy.
(This used to be commit d8a42753cc1e1a94aa6b816222343e1569521f14)

source3/printing/printfsp.c
source3/smbd/open.c

index f028e1f564ad7420406c8b6b6e436c00c13ba50f..45d937f29c40b9c1370f4aed62df397d8724bfc8 100644 (file)
@@ -77,7 +77,6 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname)
        fsp->sent_oplock_break = NO_BREAK_SENT;
        fsp->is_directory = False;
        fsp->directory_delete_on_close = False;
-       fsp->conn = conn;
        string_set(&fsp->fsp_name,print_job_fname(SNUM(conn),jobid));
        fsp->wbmpx_ptr = NULL;      
        fsp->wcp = NULL; 
index dea7edc528ee4612c4c7f843ed5f1d002141a2b7..657074581660f641844848bf4f0333fab88fe27e 100644 (file)
@@ -230,7 +230,6 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
        fsp->is_directory = False;
        fsp->is_stat = False;
        fsp->directory_delete_on_close = False;
-       fsp->conn = conn;
        string_set(&fsp->fsp_name,fname);
        fsp->wcp = NULL; /* Write cache pointer. */
 
@@ -1202,8 +1201,6 @@ files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_ST
        if(!fsp)
                return NULL;
 
-       fsp->conn = conn; /* The vfs_fXXX() macros need this. */
-
        if (VALID_STAT(*psbuf))
                got_stat = True;
 
@@ -1299,7 +1296,6 @@ files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_ST
        fsp->is_directory = True;
        fsp->is_stat = False;
        fsp->directory_delete_on_close = False;
-       fsp->conn = conn;
        string_set(&fsp->fsp_name,fname);
 
        if (delete_on_close) {
@@ -1335,8 +1331,6 @@ files_struct *open_file_stat(connection_struct *conn, char *fname, SMB_STRUCT_ST
        if(!fsp)
                return NULL;
 
-       fsp->conn = conn; /* The vfs_fXXX() macros need this. */
-
        DEBUG(5,("open_file_stat: 'opening' file %s\n", fname));
 
        /*
@@ -1365,7 +1359,6 @@ files_struct *open_file_stat(connection_struct *conn, char *fname, SMB_STRUCT_ST
        fsp->is_directory = False;
        fsp->is_stat = True;
        fsp->directory_delete_on_close = False;
-       fsp->conn = conn;
        string_set(&fsp->fsp_name,fname);
 
        conn->num_files_open++;