svn commit: samba r23987 - in branches: SAMBA_3_2/source/smbd
SAMBA_3_2_0/source/smbd
vlendec at samba.org
vlendec at samba.org
Sat Jul 21 22:00:16 GMT 2007
Author: vlendec
Date: 2007-07-21 22:00:09 +0000 (Sat, 21 Jul 2007)
New Revision: 23987
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23987
Log:
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
Modified:
branches/SAMBA_3_2/source/smbd/process.c
branches/SAMBA_3_2_0/source/smbd/process.c
Changeset:
Modified: branches/SAMBA_3_2/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/process.c 2007-07-21 21:56:33 UTC (rev 23986)
+++ branches/SAMBA_3_2/source/smbd/process.c 2007-07-21 22:00:09 UTC (rev 23987)
@@ -898,14 +898,10 @@
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 @@
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);
Modified: branches/SAMBA_3_2_0/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/process.c 2007-07-21 21:56:33 UTC (rev 23986)
+++ branches/SAMBA_3_2_0/source/smbd/process.c 2007-07-21 22:00:09 UTC (rev 23987)
@@ -890,14 +890,10 @@
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;
@@ -920,7 +916,9 @@
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);
More information about the samba-cvs
mailing list