summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-21 22:00:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:52 -0500
commit799c3ec8d466853a87b94df04e0e7b404a311bea (patch)
tree4c261ef8fbfd6a61f3be7a189c5608745e85f3d7
parent25a3427ef16f261cbfcf65abc367f55165676aaa (diff)
downloadsamba-799c3ec8d466853a87b94df04e0e7b404a311bea.tar.gz
samba-799c3ec8d466853a87b94df04e0e7b404a311bea.tar.bz2
samba-799c3ec8d466853a87b94df04e0e7b404a311bea.zip
r23987: Remove static pid in switch_message()
There's no point in duplicating functionality that exists in sys_getpid() that also only used in a debug statement (This used to be commit ebf1b1e97c709f5ffe48c85b4227a0af1f88b0ab)
-rw-r--r--source3/smbd/process.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index e6bafa8dc3..d193cfb95b 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -898,14 +898,10 @@ static void smb_dump(const char *name, int type, char *data, ssize_t len)
static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize)
{
- static pid_t pid= (pid_t)-1;
int outsize = 0;
type &= 0xff;
- if (pid == (pid_t)-1)
- pid = sys_getpid();
-
errno = 0;
last_message = type;
@@ -928,7 +924,9 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
uint16 session_tag = (lp_security() == SEC_SHARE) ? UID_FIELD_INVALID : SVAL(inbuf,smb_uid);
connection_struct *conn = conn_find(SVAL(inbuf,smb_tid));
- DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n",smb_fn_name(type),(int)pid,(unsigned long)conn));
+ DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n",
+ smb_fn_name(type), (int)sys_getpid(),
+ (unsigned long)conn));
smb_dump(smb_fn_name(type), 1, inbuf, size);