Skip to content

Commit

Permalink
[core] Fixed RCV buffer initialization in Rendezvous.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Aug 7, 2023
1 parent 88ca9cc commit 69c2376
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5598,9 +5598,9 @@ bool srt::CUDT::prepareBuffers(CUDTException* eout)
// CryptoControl has to be initialized and in case of RESPONDER the KM REQ must be processed (interpretSrtHandshake(..)) for the crypto mode to be deduced.
const int authtag = (m_pCryptoControl && m_pCryptoControl->getCryptoMode() == CSrtConfig::CIPHER_MODE_AES_GCM) ? HAICRYPT_AUTHTAG_MAX : 0;
m_pSndBuffer = new CSndBuffer(32, m_iMaxSRTPayloadSize, authtag);
SRT_ASSERT(m_iISN != -1);
m_pRcvBuffer = new srt::CRcvBuffer(m_iISN, m_config.iRcvBufSize, m_pRcvQueue->m_pUnitQueue, m_config.bMessageAPI);
// after introducing lite ACK, the sndlosslist may not be cleared in time, so it requires twice space.
SRT_ASSERT(m_iPeerISN != -1);
m_pRcvBuffer = new srt::CRcvBuffer(m_iPeerISN, m_config.iRcvBufSize, m_pRcvQueue->m_pUnitQueue, m_config.bMessageAPI);
// After introducing lite ACK, the sndlosslist may not be cleared in time, so it requires twice a space.
m_pSndLossList = new CSndLossList(m_iFlowWindowSize * 2);
m_pRcvLossList = new CRcvLossList(m_config.iFlightFlagSize);
}
Expand Down

0 comments on commit 69c2376

Please sign in to comment.