@@ -2330,44 +2330,6 @@ int CUDTGroup::recv(char* buf, int len, SRT_MSGCTRL& w_mc)
23302330 throw CUDTException (MJ_AGAIN, MN_RDAVAIL, 0 );
23312331}
23322332
2333- // [[using locked(m_GroupLock)]]
2334- CUDTGroup::ReadPos* CUDTGroup::checkPacketAhead ()
2335- {
2336- typedef map<SRTSOCKET, ReadPos>::iterator pit_t ;
2337- ReadPos* out = 0 ;
2338-
2339- // This map no longer maps only ahead links.
2340- // Here are all links, and whether ahead, it's defined by the sequence.
2341- for (pit_t i = m_Positions.begin (); i != m_Positions.end (); ++i)
2342- {
2343- // i->first: socket ID
2344- // i->second: ReadPos { sequence, packet }
2345- // We are not interested with the socket ID because we
2346- // aren't going to read from it - we have the packet already.
2347- ReadPos& a = i->second ;
2348-
2349- const int seqdiff = CSeqNo::seqcmp (a.mctrl .pktseq , m_RcvBaseSeqNo);
2350- if (seqdiff == 1 )
2351- {
2352- // The very next packet. Return it.
2353- HLOGC (grlog.Debug ,
2354- log << " group/recv: Base %" << m_RcvBaseSeqNo << " ahead delivery POSSIBLE %" << a.mctrl .pktseq
2355- << " #" << a.mctrl .msgno << " from @" << i->first << " )" );
2356- out = &a;
2357- }
2358- else if (seqdiff < 1 && !a.packet .empty ())
2359- {
2360- HLOGC (grlog.Debug ,
2361- log << " group/recv: @" << i->first << " dropping collected ahead %" << a.mctrl .pktseq << " #"
2362- << a.mctrl .msgno << " with base %" << m_RcvBaseSeqNo);
2363- a.packet .clear ();
2364- }
2365- // In case when it's >1, keep it in ahead
2366- }
2367-
2368- return out;
2369- }
2370-
23712333const char * CUDTGroup::StateStr (CUDTGroup::GroupState st)
23722334{
23732335 static const char * const states[] = {" PENDING" , " IDLE" , " RUNNING" , " BROKEN" };
0 commit comments