summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-14 00:50:48 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-14 00:50:48 +0000
commit2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf (patch)
treee217622062ac847e81b944e1bf111f67c1c75c2a /source3/smbd/process.c
parentcdb8c99fce9b24d18f664f9ed42062f8a945e395 (diff)
downloadsamba-2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf.tar.gz
samba-2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf.tar.bz2
samba-2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf.zip
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)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c9
1 files changed, 7 insertions, 2 deletions
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)