mirror of https://github.com/Icinga/icinga2.git
parent
531845c616
commit
1bce8cec97
|
@ -348,11 +348,11 @@ void ClusterListener::OpenLogFile(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
StdioStream::Ptr logStream = boost::make_shared<StdioStream>(fp, true);
|
StdioStream::Ptr logStream = boost::make_shared<StdioStream>(fp, true);
|
||||||
#ifdef ZLIB
|
#ifdef HAVE_BIOZLIB
|
||||||
m_LogFile = boost::make_shared<ZlibStream>(logStream);
|
m_LogFile = boost::make_shared<ZlibStream>(logStream);
|
||||||
#else /* ZLIB */
|
#else /* HAVE_BIOZLIB */
|
||||||
m_LogFile = logStream;
|
m_LogFile = logStream;
|
||||||
#endif /* ZLIB */
|
#endif /* HAVE_BIOZLIB */
|
||||||
m_LogMessageCount = 0;
|
m_LogMessageCount = 0;
|
||||||
m_LogMessageTimestamp = 0;
|
m_LogMessageTimestamp = 0;
|
||||||
}
|
}
|
||||||
|
@ -435,11 +435,11 @@ void ClusterListener::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Ptr
|
||||||
|
|
||||||
std::fstream *fp = new std::fstream(path.CStr(), std::fstream::in);
|
std::fstream *fp = new std::fstream(path.CStr(), std::fstream::in);
|
||||||
StdioStream::Ptr logStream = boost::make_shared<StdioStream>(fp, true);
|
StdioStream::Ptr logStream = boost::make_shared<StdioStream>(fp, true);
|
||||||
#ifdef ZLIB
|
#ifdef HAVE_BIOZLIB
|
||||||
ZlibStream::Ptr lstream = boost::make_shared<ZlibStream>(logStream);
|
ZlibStream::Ptr lstream = boost::make_shared<ZlibStream>(logStream);
|
||||||
#else /* ZLIB */
|
#else /* HAVE_BIOZLIB */
|
||||||
Stream::Ptr lstream = logStream;
|
Stream::Ptr lstream = logStream;
|
||||||
#endif /* ZLIB */
|
#endif /* HAVE_BIOZLIB */
|
||||||
|
|
||||||
String message;
|
String message;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -113,6 +113,14 @@ AC_CHECK_LIB(ws2_32, getsockname)
|
||||||
AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
|
AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
|
||||||
AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2 pthread_set_name_np pthread_setname_np])
|
AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2 pthread_set_name_np pthread_setname_np])
|
||||||
|
|
||||||
|
AC_TRY_LINK([#include <openssl/evp.h>
|
||||||
|
#include <openssl/bio.h>
|
||||||
|
#include <openssl/comp.h>], [BIO_f_zlib();], ac_cv_lib_biozlib="yes")
|
||||||
|
if test "$ac_cv_lib_biozlib" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_BIOZLIB, 1,
|
||||||
|
[Define if BIO_f_zlib is available])
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -Wall -Wextra"
|
CFLAGS="$CFLAGS -Wall -Wextra"
|
||||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra"
|
CXXFLAGS="$CXXFLAGS -Wall -Wextra"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "base/objectlock.h"
|
#include "base/objectlock.h"
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
||||||
#ifdef ZLIB
|
#ifdef HAVE_BIOZLIB
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
|
@ -79,4 +79,4 @@ bool ZlibStream::IsEof(void) const
|
||||||
return BIO_eof(m_BIO);
|
return BIO_eof(m_BIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ZLIB */
|
#endif /* HAVE_BIOZLIB */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "base/stream_bio.h"
|
#include "base/stream_bio.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifdef ZLIB
|
#ifdef HAVE_BIOZLIB
|
||||||
|
|
||||||
namespace icinga {
|
namespace icinga {
|
||||||
|
|
||||||
|
@ -50,6 +50,6 @@ private:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ZLIB */
|
#endif /* HAVE_BIOZLIB */
|
||||||
|
|
||||||
#endif /* ZLIBSTREAM_H */
|
#endif /* ZLIBSTREAM_H */
|
||||||
|
|
Loading…
Reference in New Issue