提交 bc2ab5aa authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Make clang-tidy happier

上级 ddb1f3e0
...@@ -28,9 +28,9 @@ namespace RTC ...@@ -28,9 +28,9 @@ namespace RTC
private: private:
void RollbackProducer( void RollbackProducer(
RTC::Producer* producer, RTC::Producer* producer,
std::vector<uint32_t>& previousSsrcs, const std::vector<uint32_t>& previousSsrcs,
std::string& previousMuxId, const std::string& previousMuxId,
std::string& previousRid); const std::string& previousRid);
public: public:
// Table of SSRC / Producer pairs. // Table of SSRC / Producer pairs.
......
...@@ -57,7 +57,7 @@ private: ...@@ -57,7 +57,7 @@ private:
static void SetRtcIPv6(const std::string& ip); static void SetRtcIPv6(const std::string& ip);
static void SetRtcPorts(); static void SetRtcPorts();
static void SetDtlsCertificateAndPrivateKeyFiles(); static void SetDtlsCertificateAndPrivateKeyFiles();
static void SetLogTags(std::vector<std::string>& tags); static void SetLogTags(const std::vector<std::string>& tags);
static void SetLogTags(Json::Value& json); static void SetLogTags(Json::Value& json);
public: public:
......
...@@ -50,7 +50,7 @@ namespace RTC ...@@ -50,7 +50,7 @@ namespace RTC
{ {
/* Static. */ /* Static. */
static constexpr int dtlsMtu{ 1350 }; static constexpr int DtlsMtu{ 1350 };
static constexpr int SslReadBufferSize{ 65536 }; static constexpr int SslReadBufferSize{ 65536 };
// NOTE: Those values are hardcoded as we just use AES_CM_128_HMAC_SHA1_80 and // NOTE: Those values are hardcoded as we just use AES_CM_128_HMAC_SHA1_80 and
// AES_CM_128_HMAC_SHA1_32 which share same length values for key and salt. // AES_CM_128_HMAC_SHA1_32 which share same length values for key and salt.
...@@ -551,8 +551,8 @@ namespace RTC ...@@ -551,8 +551,8 @@ namespace RTC
SSL_set_bio(this->ssl, this->sslBioFromNetwork, this->sslBioToNetwork); SSL_set_bio(this->ssl, this->sslBioFromNetwork, this->sslBioToNetwork);
// Set the MTU so that we don't send packets that are too large with no fragmentation. // Set the MTU so that we don't send packets that are too large with no fragmentation.
SSL_set_mtu(this->ssl, dtlsMtu); SSL_set_mtu(this->ssl, DtlsMtu);
DTLS_set_link_mtu(this->ssl, dtlsMtu); DTLS_set_link_mtu(this->ssl, DtlsMtu);
/* Set the DTLS timer. */ /* Set the DTLS timer. */
...@@ -873,7 +873,7 @@ namespace RTC ...@@ -873,7 +873,7 @@ namespace RTC
// Process the handshake just once (ignore if DTLS renegotiation). // Process the handshake just once (ignore if DTLS renegotiation).
if (!wasHandshakeDone && this->remoteFingerprint.algorithm != FingerprintAlgorithm::NONE) if (!wasHandshakeDone && this->remoteFingerprint.algorithm != FingerprintAlgorithm::NONE)
return ProcessHandshake(); return ProcessHandshake();
else
return true; return true;
} }
// Check if the peer sent close alert or a fatal error happened. // Check if the peer sent close alert or a fatal error happened.
...@@ -1008,8 +1008,7 @@ namespace RTC ...@@ -1008,8 +1008,7 @@ namespace RTC
return true; return true;
} }
else
{
// NOTE: We assume that "use_srtp" DTLS extension is required even if // NOTE: We assume that "use_srtp" DTLS extension is required even if
// there is no audio/video. // there is no audio/video.
MS_WARN_TAG(dtls, "SRTP profile not negotiated"); MS_WARN_TAG(dtls, "SRTP profile not negotiated");
...@@ -1022,7 +1021,6 @@ namespace RTC ...@@ -1022,7 +1021,6 @@ namespace RTC
return false; return false;
} }
}
inline bool DtlsTransport::CheckRemoteFingerprint() inline bool DtlsTransport::CheckRemoteFingerprint()
{ {
......
...@@ -83,7 +83,6 @@ namespace RTC ...@@ -83,7 +83,6 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (this->tuple != nullptr)
delete this->tuple; delete this->tuple;
if (this->udpSocket != nullptr) if (this->udpSocket != nullptr)
...@@ -224,7 +223,7 @@ namespace RTC ...@@ -224,7 +223,7 @@ namespace RTC
bool PlainRtpTransport::IsConnected() const bool PlainRtpTransport::IsConnected() const
{ {
return this->tuple ? true : false; return this->tuple != nullptr;
} }
void PlainRtpTransport::SendRtcpCompoundPacket(RTC::RTCP::CompoundPacket* packet) void PlainRtpTransport::SendRtcpCompoundPacket(RTC::RTCP::CompoundPacket* packet)
......
...@@ -328,9 +328,9 @@ namespace RTC ...@@ -328,9 +328,9 @@ namespace RTC
void RtpListener::RollbackProducer( void RtpListener::RollbackProducer(
RTC::Producer* producer, RTC::Producer* producer,
std::vector<uint32_t>& previousSsrcs, const std::vector<uint32_t>& previousSsrcs,
std::string& previousMuxId, const std::string& previousMuxId,
std::string& previousRid) const std::string& previousRid)
{ {
MS_TRACE(); MS_TRACE();
......
...@@ -364,7 +364,7 @@ namespace RTC ...@@ -364,7 +364,7 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
static const std::string type("transport"); static const std::string Type("transport");
static const Json::StaticString JsonStringType{ "type" }; static const Json::StaticString JsonStringType{ "type" };
static const Json::StaticString JsonStringTimestamp{ "timestamp" }; static const Json::StaticString JsonStringTimestamp{ "timestamp" };
static const Json::StaticString JsonStringId{ "id" }; static const Json::StaticString JsonStringId{ "id" };
...@@ -393,7 +393,7 @@ namespace RTC ...@@ -393,7 +393,7 @@ namespace RTC
Json::Value json(Json::objectValue); Json::Value json(Json::objectValue);
json[JsonStringType] = type; json[JsonStringType] = Type;
json[JsonStringTimestamp] = Json::UInt64{ DepLibUV::GetTime() }; json[JsonStringTimestamp] = Json::UInt64{ DepLibUV::GetTime() };
json[JsonStringId] = Json::UInt{ this->transportId }; json[JsonStringId] = Json::UInt{ this->transportId };
......
...@@ -543,7 +543,7 @@ void Settings::SetDtlsCertificateAndPrivateKeyFiles() ...@@ -543,7 +543,7 @@ void Settings::SetDtlsCertificateAndPrivateKeyFiles()
Settings::configuration.dtlsPrivateKeyFile = dtlsPrivateKeyFile; Settings::configuration.dtlsPrivateKeyFile = dtlsPrivateKeyFile;
} }
void Settings::SetLogTags(std::vector<std::string>& tags) void Settings::SetLogTags(const std::vector<std::string>& tags)
{ {
MS_TRACE(); MS_TRACE();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论