Skip to content

Commit

Permalink
Fixed compilation errors when SRT is configured with --disable-loggin…
Browse files Browse the repository at this point in the history
…g option (#616) (#632)

* fixed compilation errors when SRT is configured with --disable-logging option (#616)
  • Loading branch information
maxtomilov authored and rndi committed Apr 5, 2019
1 parent 6961a38 commit fc78683
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 9 additions & 8 deletions srtcore/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,9 @@ std::string TransmissionEventStr(ETransmissionEvent ev)
return vals[ev];
}

// Some logging imps
#if ENABLE_LOGGING

namespace srt_logging
{

Expand All @@ -862,24 +865,22 @@ std::string FormatTime(uint64_t time)
out << tmp_buf << setfill('0') << setw(6) << usec;
return out.str();
}
// Some logging imps
#if ENABLE_LOGGING

LogDispatcher::Proxy::Proxy(LogDispatcher& guy) : that(guy), that_enabled(that.CheckEnabled())
{
if (that_enabled)
{
if (that_enabled)
{
i_file = "";
i_line = 0;
flags = that.src_config->flags;
// Create logger prefix
that.CreateLogLinePrefix(os);
}
// Create logger prefix
that.CreateLogLinePrefix(os);
}
}

LogDispatcher::Proxy LogDispatcher::operator()()
{
return Proxy(*this);
return Proxy(*this);
}

void LogDispatcher::CreateLogLinePrefix(std::ostringstream& serr)
Expand Down
2 changes: 2 additions & 0 deletions srtcore/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ class CCryptoControl
/// during transmission (otherwise it's during the handshake)
void getKmMsg_markSent(size_t ki, bool runtime)
{
#if ENABLE_LOGGING
using srt_logging::mglog;
#endif

m_SndKmLastTime = CTimer::getTime();
if (runtime)
Expand Down

0 comments on commit fc78683

Please sign in to comment.