Skip to content

Commit e31480b

Browse files
committed
Remvoe some "TODO: SCTP" items
1 parent f14a6d4 commit e31480b

11 files changed

Lines changed: 32 additions & 43 deletions

worker/src/RTC/SCTP/association/Association.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::Association"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/association/Association.hpp"
65
#include "Logger.hpp"
@@ -519,23 +518,23 @@ namespace RTC
519518
{
520519
MS_TRACE();
521520

522-
// TODO: SCTP: For testing purposes. Must be removed.
523-
{
524-
MS_DUMP("<<< received SCTP packet:");
521+
// For debugging purposes.
522+
#if MS_LOG_DEV_LEVEL == 3
523+
MS_DUMP("<<< received SCTP packet:");
525524

526-
const auto* packet = RTC::SCTP::Packet::Parse(data, len);
525+
const auto* packet = RTC::SCTP::Packet::Parse(data, len);
527526

528-
if (packet)
529-
{
530-
packet->Dump();
527+
if (packet)
528+
{
529+
packet->Dump();
531530

532-
delete packet;
533-
}
534-
else
535-
{
536-
MS_ABORT("RTC::SCTP::Packet::Parse() failed to parse received SCTP data");
537-
}
531+
delete packet;
532+
}
533+
else
534+
{
535+
MS_ERROR("RTC::SCTP::Packet::Parse() failed to parse received SCTP data");
538536
}
537+
#endif
539538

540539
this->privateMetrics.rxPacketsCount++;
541540

worker/src/RTC/SCTP/association/HeartbeatHandler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::HeartbeatHandler"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/association/HeartbeatHandler.hpp"
65
#include "Logger.hpp"

worker/src/RTC/SCTP/association/PacketSender.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ namespace RTC
3333
packet->WriteCRC32cChecksum();
3434
}
3535

36-
// TODO: SCTP: For testing purposes. Must be removed.
37-
{
38-
MS_DUMP(">>> sending SCTP packet:");
36+
// For debugging purposes.
37+
#if MS_LOG_DEV_LEVEL == 3
38+
MS_DUMP(">>> sending SCTP packet:");
3939

40-
packet->Dump();
41-
}
40+
packet->Dump();
41+
#endif
4242

4343
MS_ASSERT(!packet->NeedsConsolidation(), "cannot send a SCTP packet that needs consolidation");
4444

worker/src/RTC/SCTP/association/StreamResetHandler.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::StreamResetHandler"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/association/StreamResetHandler.hpp"
65
#include "Logger.hpp"
@@ -301,10 +300,6 @@ namespace RTC
301300
// "In Progress" request. In all cases, re-evaluate the state.
302301
this->lastProcessedReqSeqNbr = requestSn;
303302

304-
// TODO: SCTP: Remove (it's just to avoid "private field 'reassemblyQueue'
305-
// is not used" wargning).
306-
(void)this->reassemblyQueue;
307-
308303
if (
309304
this->dataTracker->IsLaterThanCumulativeAckedTsn(
310305
receivedOutgoingSsnResetRequestParameter->GetSenderLastAssignedTsn()))

worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::TransmissionControlBlock"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/association/TransmissionControlBlock.hpp"
65
#include "Logger.hpp"

worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::ShutdownCompleteChunk"
2-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
33

44
#include "RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp"
55
#include "Logger.hpp"

worker/src/RTC/SCTP/rx/DataTracker.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::DataTracker"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/rx/DataTracker.hpp"
65
#include "Logger.hpp"
@@ -181,8 +180,10 @@ namespace RTC
181180
// about partly received (or not received at all) data, up until
182181
// `newCumulativeTsn`.
183182

184-
const Types::UnwrappedTsn unwrappedTsn = this->tsnUnwrapper.Unwrap(newCumulativeTsn);
183+
const Types::UnwrappedTsn unwrappedTsn = this->tsnUnwrapper.Unwrap(newCumulativeTsn);
184+
#if MS_LOG_DEV_LEVEL == 3
185185
const Types::UnwrappedTsn prevLastCumAckTsn = this->lastCumulativeAckedTsn;
186+
#endif
186187

187188
// Old chunk already seen before?
188189
if (unwrappedTsn <= this->lastCumulativeAckedTsn)
@@ -332,10 +333,10 @@ namespace RTC
332333

333334
if (newAckState != this->ackState)
334335
{
336+
#if MS_LOG_DEV_LEVEL == 3
335337
const auto& previousAckStateStrView = DataTracker::AckStateToString(this->ackState);
336338
const auto& newAckStateStrView = DataTracker::AckStateToString(newAckState);
337339

338-
#if MS_LOG_DEV_LEVEL == 3
339340
MS_DEBUG_DEV(
340341
"ack state changed from %.*s to %.*s due to %.*s",
341342
static_cast<int>(previousAckStateStrView.size()),

worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::InterleavedReassemblyStreams"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/rx/InterleavedReassemblyStreams.hpp"
65
#include "Logger.hpp"

worker/src/RTC/SCTP/rx/ReassemblyQueue.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::ReassemblyQueue"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/rx/ReassemblyQueue.hpp"
65
#include "Logger.hpp"

worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define MS_CLASS "RTC::SCTP::TraditionalReassemblyStreams"
2-
// TODO: SCTP: COMMENT
3-
#define MS_LOG_DEV_LEVEL 3
2+
// #define MS_LOG_DEV_LEVEL 3
43

54
#include "RTC/SCTP/rx/TraditionalReassemblyStreams.hpp"
65
#include "Logger.hpp"

0 commit comments

Comments
 (0)