From 2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Jan 2000 00:50:48 +0000 Subject: some more work on the byte range locking note the ugly global_smbpid - I hope that won't bethere for long, I just didn't want to do two lots of major surgery at the one time. Using global_smbpid avoids the big change of getting rid of our inbuf/outbuf interface to reply routines. I'll do that once the locking stuff passes all tests. (This used to be commit f8bebf91abcaa5bda3ec8701f9242f220da8943a) --- source3/smbd/process.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 04432adb96..d3551b96b1 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -25,7 +25,7 @@ extern int DEBUGLEVEL; struct timeval smb_last_time; -char *InBuffer = NULL; +static char *InBuffer = NULL; char *OutBuffer = NULL; char *last_inbuf = NULL; @@ -420,6 +420,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize sizeof(smb_messages) / sizeof(struct smb_message_struct); int match; extern int Client; + extern int global_smbpid; if (pid == (pid_t)-1) pid = getpid(); @@ -438,6 +439,10 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize if (smb_messages[match].code == type) break; + /* yuck! this is an interim measure before we get rid of our + current inbuf/outbuf system */ + global_smbpid = SVAL(inbuf,smb_pid); + if (match == num_smb_messages) { DEBUG(0,("Unknown message type %d!\n",type)); @@ -841,7 +846,7 @@ void check_reload(int t) } /**************************************************************************** - Process any timeout housekeeping. Return False if the caler should exit. + Process any timeout housekeeping. Return False if the caller should exit. ****************************************************************************/ static BOOL timeout_processing(int deadtime, int *select_timeout, time_t *last_timeout_processing_time) -- cgit