Skip to content

Commit

Permalink
Cleared out warn-errors for logging-off version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed May 27, 2024
1 parent 216c1ed commit d8cebcd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ extern const int32_t SRT_DEF_VERSION;

namespace srt {

static inline char fmt_onoff(bool val) { return val ? '+' : '-'; }

int32_t CUDTGroup::s_tokenGen = 0;

// [[using locked(this->m_GroupLock)]];
Expand Down Expand Up @@ -2189,10 +2191,9 @@ int CUDTGroup::recv(char* buf, int len, SRT_MSGCTRL& w_mc)
{
if (!m_bOpened || !m_bConnected)
{
const char onoff[2] = {'-', '+'};
LOGC(grlog.Error,
log << "grp/recv: $" << id() << ": ABANDONING: opened" << onoff[m_bOpened]
<< " connected" << onoff[m_bConnected]);
log << "grp/recv: $" << id() << ": ABANDONING: opened" << fmt_onoff(m_bOpened)
<< " connected" << fmt_onoff(m_bConnected));
throw CUDTException(MJ_CONNECTION, MN_NOCONN, 0);
}

Expand Down
4 changes: 4 additions & 0 deletions srtcore/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,10 @@ struct CMultiplexer
, m_pRcvQueue(NULL)
, m_pChannel(NULL)
, m_pTimer(NULL)
, m_iPort(0)
, m_iIPversion(0)
, m_iRefCount(1)
, m_iID(-1)
{
}

Expand Down
8 changes: 6 additions & 2 deletions testing/testactivemedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

using namespace std;

#if ENABLE_LOGGING
namespace {
const char* fmt_yesno(bool b) { return b ? "yes" : "no"; }
}
#endif

void SourceMedium::Runner()
{
Expand Down Expand Up @@ -82,10 +87,9 @@ void TargetMedium::Runner()
return;
}

const char* yesno[2] = {"no", "yes"};
bool gotsomething = ready.wait_for(lg, chrono::seconds(1), [this] { return !running || !buffer.empty(); } );
LOGP(applog.Debug, "TargetMedium(", typeid(*med).name(), "): [", val.payload.size(), "] BUFFER update (timeout:",
yesno[!gotsomething], " running: ", running, ")");
fmt_yesno(!gotsomething), " running: ", running, ")");
if (::transmit_int_state || !running || !med || med->Broken())
{
LOGP(applog.Debug, "TargetMedium(", typeid(*med).name(), "): buffer empty, medium ",
Expand Down

0 comments on commit d8cebcd

Please sign in to comment.