Skip to content

Commit

Permalink
Added some more error logs for errors in reception
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed Jan 29, 2018
1 parent dc2a555 commit b699950
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions srtcore/core.cpp
Expand Up @@ -3386,6 +3386,8 @@ EConnectStatus CUDT::postConnect(const CPacket& response, bool rendezvous, CUDTE
// acknowledde any waiting epolls to write
s_UDTUnited.m_EPoll.update_events(m_SocketID, m_sPollID, UDT_EPOLL_OUT, true);

LOGC(mglog.Note, log << "Connection established to: " << SockaddrToString(m_pPeerAddr));

return CONN_ACCEPT;
}

Expand Down Expand Up @@ -4585,6 +4587,8 @@ void CUDT::checkNeedDrop(ref_t<bool> bCongestion)
{
m_iSndCurrSeqNo = minlastack;
}
LOGC(dlog.Error, log << "DROPPED " << dpkts << " packets - lost delaying for " << timespan_ms << "ms");

HLOGF(dlog.Debug, "drop,now %lluus,%d-%d seqs,%d pkts,%d bytes,%d ms",
(unsigned long long)CTimer::getTime(),
realack, m_iSndCurrSeqNo,
Expand Down Expand Up @@ -7063,6 +7067,9 @@ int CUDT::processData(CUnit* unit)
EncryptionStatus rc = m_pCryptoControl ? m_pCryptoControl->decrypt(Ref(packet)) : ENCS_NOTSUP;
if ( rc != ENCS_CLEAR )
{
#if ENABLE_LOGGING
static int nereport = 0;
#endif
/*
* Could not decrypt
* Keep packet in received buffer
Expand All @@ -7073,6 +7080,10 @@ int CUDT::processData(CUnit* unit)
m_ullTraceRcvBytesUndecrypt += pktsz;
m_iRcvUndecryptTotal += 1;
m_ullRcvBytesUndecryptTotal += pktsz;
#if ENABLE_LOGGING
if (nereport++%100 == 0)
LOGC(dlog.Error, log << "DECRYPT ERROR - dropping a packet of " << packet.getLength() << " bytes");
#endif
}
}
else
Expand Down

0 comments on commit b699950

Please sign in to comment.