Browse Source

Cleaned up irrelevant log counters for SCTP transport

Paul-Louis Ageneau 2 years ago
parent
commit
ee6a382cfb
1 changed files with 4 additions and 9 deletions
  1. 4 9
      src/impl/sctptransport.cpp

+ 4 - 9
src/impl/sctptransport.cpp

@@ -84,11 +84,6 @@ namespace rtc::impl {
 
 static LogCounter COUNTER_UNKNOWN_PPID(plog::warning,
                                        "Number of SCTP packets received with an unknown PPID");
-static LogCounter
-    COUNTER_BAD_NOTIF_LEN(plog::warning,
-                          "Number of SCTP packets received with an bad notification length");
-static LogCounter COUNTER_BAD_SCTP_STATUS(plog::warning,
-                                          "Number of SCTP packets received with a bad status");
 
 class SctpTransport::InstancesSet {
 public:
@@ -817,7 +812,8 @@ void SctpTransport::processData(binary &&data, uint16_t sid, PayloadId ppid) {
 
 void SctpTransport::processNotification(const union sctp_notification *notify, size_t len) {
 	if (len != size_t(notify->sn_header.sn_length)) {
-		COUNTER_BAD_NOTIF_LEN++;
+		PLOG_WARNING << "Unexpected notification length, expected=" << notify->sn_header.sn_length
+		             << ", actual=" << len;
 		return;
 	}
 
@@ -919,10 +915,9 @@ optional<milliseconds> SctpTransport::rtt() {
 
 	struct sctp_status status = {};
 	socklen_t len = sizeof(status);
-	if (usrsctp_getsockopt(mSock, IPPROTO_SCTP, SCTP_STATUS, &status, &len)) {
-		COUNTER_BAD_SCTP_STATUS++;
+	if (usrsctp_getsockopt(mSock, IPPROTO_SCTP, SCTP_STATUS, &status, &len))
 		return nullopt;
-	}
+
 	return milliseconds(status.sstat_primary.spinfo_srtt);
 }