Hi Fathi

I've reported a bug for the Debian package libapache2-mod-shib which depends on liblog4cpp. The problem apparently are threading issues which are solved with the patch below. Please also
make sure the package is compiled with pthread support.

--- ./log4cpp-0.3.5-rc3/src/Appender.cpp 2002-10-27 02:48:52.000000000 +0100 +++ ./log4cpp-0.3.5rc1/src/Appender.cpp 2004-10-26 22:08:28.000000000 +0200
@@ -11,14 +11,11 @@
#include <log4cpp/Appender.hh>

namespace log4cpp {
-    Appender::AppenderMap* Appender::_allAppenders;
    threading::Mutex Appender::_appenderMapMutex;

    /* assume _appenderMapMutex locked */
    Appender::AppenderMap& Appender::_getAllAppenders() {
-        if (!_allAppenders)
-            _allAppenders = new Appender::AppenderMap();
-
+ static Appender::AppenderMap* _allAppenders = new Appender::AppenderMap();
        return *_allAppenders;
    }

--
Patrik Schnellmann


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to