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

C++: add missing { } in if() conditions

上级 88a399d4
......@@ -57,9 +57,13 @@ namespace RTC
for (auto it = this->streamIdTable.begin(); it != this->streamIdTable.end();)
{
if (it->second == dataProducer)
{
it = this->streamIdTable.erase(it);
}
else
{
++it;
}
}
}
......
......@@ -60,13 +60,17 @@ namespace RTC
// a DTLS Close Alert this would be closed (Close() called) so we cannot call
// our listeners anymore.
if (IsClosed())
{
return;
}
const size_t dataLen = this->bufferDataLen - this->frameStart;
size_t packetLen;
if (dataLen >= 2)
{
packetLen = size_t{ Utils::Byte::Get2Bytes(this->buffer + this->frameStart, 0) };
}
// We have packetLen bytes.
if (dataLen >= 2 && dataLen >= 2 + packetLen)
......
......@@ -336,20 +336,34 @@ namespace RTC
switch (this->sctpAssociation->GetState())
{
case RTC::SctpAssociation::SctpState::NEW:
{
sctpState = FBS::SctpAssociation::SctpState::NEW;
break;
}
case RTC::SctpAssociation::SctpState::CONNECTING:
{
sctpState = FBS::SctpAssociation::SctpState::CONNECTING;
break;
}
case RTC::SctpAssociation::SctpState::CONNECTED:
{
sctpState = FBS::SctpAssociation::SctpState::CONNECTED;
break;
}
case RTC::SctpAssociation::SctpState::FAILED:
{
sctpState = FBS::SctpAssociation::SctpState::FAILED;
break;
}
case RTC::SctpAssociation::SctpState::CLOSED:
{
sctpState = FBS::SctpAssociation::SctpState::CLOSED;
break;
}
}
sctpListener = this->sctpListener.FillBuffer(builder);
......@@ -403,20 +417,34 @@ namespace RTC
switch (this->sctpAssociation->GetState())
{
case RTC::SctpAssociation::SctpState::NEW:
{
sctpState = FBS::SctpAssociation::SctpState::NEW;
break;
}
case RTC::SctpAssociation::SctpState::CONNECTING:
{
sctpState = FBS::SctpAssociation::SctpState::CONNECTING;
break;
}
case RTC::SctpAssociation::SctpState::CONNECTED:
{
sctpState = FBS::SctpAssociation::SctpState::CONNECTED;
break;
}
case RTC::SctpAssociation::SctpState::FAILED:
{
sctpState = FBS::SctpAssociation::SctpState::FAILED;
break;
}
case RTC::SctpAssociation::SctpState::CLOSED:
{
sctpState = FBS::SctpAssociation::SctpState::CLOSED;
break;
}
}
}
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论