From: Chris B. <buc...@us...> - 2013-09-18 22:57:33
|
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_1.3 has been updated via b6344bc23894624251034d5538374c2ec7b47c7f (commit) from cce7e6179a3de5db3ed4c70d57e1bd6ceea9ea78 (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 b6344bc23894624251034d5538374c2ec7b47c7f Author: buccella <buc...@li...> Date: Wed Sep 18 18:57:14 2013 -0400 [sfcb-tix:#69] Fix logger for long-lived clients, was: "#2347 Don't spawn logger for clients" ----------------------------------------------------------------------- Summary of changes: cimcClientSfcbLocal.c | 2 +- contributions.txt | 1 + mlog.c | 5 +++-- mlog.h | 2 +- sfcBroker.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index eb5f620..38a79d1 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -214,7 +214,7 @@ static CMPIStatus releaseClient(Client * mb) if (cl->connection) CMRelease(cl->connection); free(cl); - closeLogging(); + closeLogging(0); return rc; } diff --git a/contributions.txt b/contributions.txt index 67a53a1..7f1cd1c 100644 --- a/contributions.txt +++ b/contributions.txt @@ -117,6 +117,7 @@ Klaus Kampf, Novell 03/29/2012 [ 3441028 ] sblim-sfcb fails on large https requests 03/29/2012 [ 3416054 ] Provider continues despite SIGSEGV 01/05/2013 [ 3599329 ] dlopen failed for sfcbCustomLib +09/18/2013 [sfcb-tix:#69] Fix logger for long-lived clients, was: "#2347 Don't spawn logger for clients" Mike Brasher, Inova ------------------- diff --git a/mlog.c b/mlog.c index a44f865..bb82366 100644 --- a/mlog.c +++ b/mlog.c @@ -130,10 +130,11 @@ void startLogging(int level, int thread) { * Closes the pipe used for logging and closes out * the syslog services that are created in startLogging. */ -void closeLogging() { +void closeLogging(int thread) { int wstat; closelog(); - close(logfds[1]); + if (thread) + close(logfds[1]); wait(&wstat); // wait to prevent zombie } diff --git a/mlog.h b/mlog.h index fc378eb..caa4682 100644 --- a/mlog.h +++ b/mlog.h @@ -30,7 +30,7 @@ #define LOG_MSG_MAX 4096 void startLogging(int level, int thread); -void closeLogging(); +void closeLogging(int thread); void mlogf(int priority, int errout, const char* fmt, ...); #endif diff --git a/sfcBroker.c b/sfcBroker.c index 234efa6..88277b8 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -249,7 +249,7 @@ static void stopBroker(void *p) uninitSocketPairs(); sunsetControl(); uninitGarbageCollector(); - closeLogging(); + closeLogging(1); free((void *)sfcBrokerStart); pthread_mutex_unlock(&syncMtx); hooks/post-receive -- sfcb - Small Footprint CIM Broker |