summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-17 03:52:05 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-17 03:52:05 +0000
commit8978aae69699ccab76fdf95037948b1cc7e7c286 (patch)
tree19d2fdbc1da4d4353d226a81960f500ac06c0359 /source3/smbd/nttrans.c
parentf2d538a105a61ce6d2852700fc328e15ac158827 (diff)
downloadsamba-8978aae69699ccab76fdf95037948b1cc7e7c286.tar.gz
samba-8978aae69699ccab76fdf95037948b1cc7e7c286.tar.bz2
samba-8978aae69699ccab76fdf95037948b1cc7e7c286.zip
much cleaner chain pointer handling for both files and pipes.
the chain pointer is now stored as a static and is set whenever a handle is created or extracted. This also makes the code less error prone. (This used to be commit 068a862982bea726e8d7b1b4065d510b9840a272)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 31bfac25c8..89efd7ccd7 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -24,7 +24,6 @@
extern int DEBUGLEVEL;
extern int Protocol;
-extern files_struct *chain_fsp;
extern int Client;
extern int oplock_sock;
extern int smb_read_error;
@@ -665,8 +664,6 @@ int reply_ntcreate_and_X(connection_struct *conn,
SCVAL(p,0,fsp->is_directory ? 1 : 0);
}
- chain_fsp = fsp;
-
DEBUG(5,("reply_ntcreate_and_X: open name = %s\n",
fsp?fsp->fsp_name:"NULL"));
@@ -941,7 +938,7 @@ static int call_nt_transact_rename(connection_struct *conn,
{
char *params = *ppparams;
pstring new_name;
- files_struct *fsp = GETFSP(params, 0);
+ files_struct *fsp = file_fsp(params, 0);
BOOL replace_if_exists = (SVAL(params,2) & RENAME_REPLACE_IF_EXISTS) ? True : False;
uint32 fname_len = MIN((((uint32)IVAL(inbuf,smb_nt_TotalParameterCount)-4)),
((uint32)sizeof(new_name)-1));
@@ -1166,7 +1163,7 @@ static int call_nt_transact_notify_change(connection_struct *conn,
change_notify_buf *cnbp;
struct stat st;
- fsp = GETFSP(setup,4);
+ fsp = file_fsp(setup,4);
DEBUG(3,("call_nt_transact_notify_change\n"));