diff options
author | Jeremy Allison <jra@samba.org> | 2005-03-03 04:03:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:52 -0500 |
commit | c56d5cd4c4c0ddc2b9cb018b1cb1fceb1f2fc030 (patch) | |
tree | 1afa98ccd000b2b845f5bd2047368c93a8f52e49 /source3/smbd/trans2.c | |
parent | 02fdabc2a7f0199bc5f42afb2c744f3c740122e4 (diff) | |
download | samba-c56d5cd4c4c0ddc2b9cb018b1cb1fceb1f2fc030.tar.gz samba-c56d5cd4c4c0ddc2b9cb018b1cb1fceb1f2fc030.tar.bz2 samba-c56d5cd4c4c0ddc2b9cb018b1cb1fceb1f2fc030.zip |
r5637: Actually test and fix the crash bugs (sorry:-).
Jeremy.
(This used to be commit 4348ca48549ded8c056877befa216f0e768cb2c1)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 16cea326f9..93e497134a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -54,7 +54,7 @@ SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val) account sparse files. ********************************************************************/ -SMB_BIG_UINT get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf) +SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, SMB_STRUCT_STAT *sbuf) { SMB_BIG_UINT ret; @@ -67,7 +67,7 @@ SMB_BIG_UINT get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf) if (!ret && fsp && fsp->initial_allocation_size) ret = fsp->initial_allocation_size; - return smb_roundup(fsp->conn, ret); + return smb_roundup(conn, ret); } /**************************************************************************** @@ -936,7 +936,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, } file_size = get_file_size(sbuf); - allocation_size = get_allocation_size(NULL,&sbuf); + allocation_size = get_allocation_size(conn,NULL,&sbuf); mdate = sbuf.st_mtime; adate = sbuf.st_atime; cdate = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); @@ -1232,7 +1232,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, SOFF_T(p,0,get_file_size(sbuf)); /* File size 64 Bit */ p+= 8; - SOFF_T(p,0,get_allocation_size(NULL,&sbuf)); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(p,0,get_allocation_size(conn,NULL,&sbuf)); /* Number of bytes used on disk - 64 Bit */ p+= 8; put_long_date(p,sbuf.st_ctime); /* Inode change Time 64 Bit */ @@ -2439,7 +2439,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * fullpathname = fname; file_size = get_file_size(sbuf); - allocation_size = get_allocation_size(fsp,&sbuf); + allocation_size = get_allocation_size(conn,fsp,&sbuf); if (mode & aDIR) { /* This is necessary, as otherwise the desktop.ini file in * this folder is ignored */ @@ -2785,7 +2785,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * SOFF_T(pdata,0,get_file_size(sbuf)); /* File size 64 Bit */ pdata += 8; - SOFF_T(pdata,0,get_allocation_size(fsp,&sbuf)); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(pdata,0,get_allocation_size(conn,fsp,&sbuf)); /* Number of bytes used on disk - 64 Bit */ pdata += 8; put_long_date(pdata,sbuf.st_ctime); /* Creation Time 64 Bit */ |