From: Michael Chase-S. <mc...@us...> - 2013-01-09 18:16:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via abfe7e51f34c780e65b92d525517315a557fa55b (commit) from 8fa527ba5807999599178f7c0e660df315d5a283 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit abfe7e51f34c780e65b92d525517315a557fa55b Author: Michael Chase-Salerno <br...@li...> Date: Wed Jan 9 13:15:10 2013 -0500 3600125 Share client tracing shm segment ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index 9d92c6b..b6d4eab 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ New features: Bugs fixed: - 3599526 segfault during ecn with classProviderSf - 3599329 dlopen failed for sfcbCustomLib +- 3600125 Share client tracing shm segment Changes in 1.4.3 ================ diff --git a/trace.c b/trace.c index 6a0cea7..95191a0 100644 --- a/trace.c +++ b/trace.c @@ -58,7 +58,7 @@ unsigned long _sfcb_trace_mask = 0; /* use pointer indirect _sfcb_trace_mask to allow shared memory flag */ unsigned long *_ptr_sfcb_trace_mask = &_sfcb_trace_mask; void *vpDP = NULL; -int shmid; +int shmid=0; char *_SFCB_TRACE_FILE = NULL; int _SFCB_TRACE_TO_SYSLOG = 0; @@ -129,8 +129,9 @@ _sfcb_trace_init() char *err = NULL; FILE *ferr = NULL; int tryid = 0xDEB001; - - while ((shmid = shmget(tryid, sizeof(unsigned long), (IPC_EXCL | IPC_CREAT | 0660))) < 0 && (errno == EEXIST)) tryid++; + if (shmid == 0) { + while ((shmid = shmget(tryid, sizeof(unsigned long), (IPC_EXCL | IPC_CREAT | 0660))) < 0 && (errno == EEXIST)) tryid++; + } mlogf(M_INFO,M_SHOW,"--- Shared memory ID for tracing: %x\n", tryid); if (shmid < 0) { mlogf(M_ERROR,M_SHOW, "shmget(%x) failed in %s at line %d.\n", tryid, __FILE__, __LINE__ ); hooks/post-receive -- SFCB - Small Footprint CIM Broker |