|
From: Chris B. <buc...@us...> - 2013-09-18 22:57:32
|
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 66e4ab23134da838dec62f3d028de32652cc79ab (commit)
from 34137ef64f981be98fd8edf393b5badb875cccb4 (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 66e4ab23134da838dec62f3d028de32652cc79ab
Author: buccella <buc...@li...>
Date: Wed Sep 18 15:19:08 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 610454a..145e4f5 100644
--- a/cimcClientSfcbLocal.c
+++ b/cimcClientSfcbLocal.c
@@ -1968,7 +1968,7 @@ localConnect(ClientEnv *ce, CMPIStatus *st)
static void *
release(ClientEnv *ce)
{
- closeLogging();
+ closeLogging(0);
CONNECT_LOCK();
if (localConnectCount > 0)
localConnectCount -= 1;
diff --git a/contributions.txt b/contributions.txt
index bf7dd40..560514f 100644
--- a/contributions.txt
+++ b/contributions.txt
@@ -119,6 +119,7 @@ Klaus Kampf, Novell
03/29/2012 [ 3416054 ] Provider continues despite SIGSEGV
01/05/2013 [ 3599329 ] dlopen failed for sfcbCustomLib
01/15/2013 [ 3599437 ] missing include of <sys/resource.h>
+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 ee614fb..177dfcc 100644
--- a/mlog.c
+++ b/mlog.c
@@ -129,11 +129,12 @@ startLogging(int level, int thread)
* the syslog services that are created in startLogging.
*/
void
-closeLogging()
+closeLogging(int thread)
{
int wstat;
closelog();
- close(logfds[1]);
+ if (thread)
+ close(logfds[1]);
wait(&wstat);
}
diff --git a/mlog.h b/mlog.h
index 97edc4f..a5c6565 100644
--- a/mlog.h
+++ b/mlog.h
@@ -31,7 +31,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 8fe6788..d96a6bb 100644
--- a/sfcBroker.c
+++ b/sfcBroker.c
@@ -269,7 +269,7 @@ stopBroker()
uninitSocketPairs();
sunsetControl();
uninitGarbageCollector();
- closeLogging();
+ closeLogging(1);
free((void *)sfcBrokerStart);
pthread_mutex_unlock(&syncMtx);
hooks/post-receive
--
sfcb - Small Footprint CIM Broker
|