summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-27 02:37:59 +0200
committerVolker Lendecke <vl@samba.org>2010-09-28 07:36:15 +0200
commit52766081519ecca9ffd90b11719201537ff0c1ed (patch)
treea4bfadc01a5ce64d21f13fab8fca37e41ab003b8 /source3
parent5e26e4d30feca67ae8377006c3b1acc4d6c6aa5f (diff)
downloadsamba-52766081519ecca9ffd90b11719201537ff0c1ed.tar.gz
samba-52766081519ecca9ffd90b11719201537ff0c1ed.tar.bz2
samba-52766081519ecca9ffd90b11719201537ff0c1ed.zip
s3: Lift smbd_server_conn from file_fnum
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/files.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 1715190cc3..e903ab3f50 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -484,15 +484,16 @@ void file_free(struct smb_request *req, files_struct *fsp)
Get an fsp from a 16 bit fnum.
****************************************************************************/
-static struct files_struct *file_fnum(uint16 fnum)
+static struct files_struct *file_fnum(struct smbd_server_connection *sconn,
+ uint16 fnum)
{
files_struct *fsp;
int count=0;
- for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next, count++) {
+ for (fsp=sconn->files; fsp; fsp=fsp->next, count++) {
if (fsp->fnum == fnum) {
if (count > 10) {
- DLIST_PROMOTE(smbd_server_conn->files, fsp);
+ DLIST_PROMOTE(sconn->files, fsp);
}
return fsp;
}
@@ -512,7 +513,7 @@ files_struct *file_fsp(struct smb_request *req, uint16 fid)
return req->chain_fsp;
}
- fsp = file_fnum(fid);
+ fsp = file_fnum(smbd_server_conn, fid);
if ((fsp != NULL) && (req != NULL)) {
req->chain_fsp = fsp;
}