From 799c3ec8d466853a87b94df04e0e7b404a311bea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 21 Jul 2007 22:00:09 +0000 Subject: 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) --- source3/smbd/process.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3') 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); -- cgit