]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23987: Remove static pid in switch_message()
authorVolker Lendecke <vlendec@samba.org>
Sat, 21 Jul 2007 22:00:09 +0000 (22:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:52 +0000 (12:28 -0500)
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

index e6bafa8dc3c4b951c3ef7f05b8fc7574f6392afd..d193cfb95b097c14fb5a8ff6370d967c3e9c5edc 100644 (file)
@@ -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);