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

optimize stuff

上级 27c98ce1
......@@ -10,13 +10,13 @@ const shell = require('gulp-shell');
let tests =
[
// 'test/test_mediasoup.js',
// 'test/test_Server.js',
'test/test_mediasoup.js',
'test/test_Server.js',
'test/test_Room.js',
'test/test_Peer.js',
'test/test_Transport.js',
'test/test_RtpReceiver.js',
// 'test/test_extra.js'
'test/test_extra.js'
// NOTE: Disable this test until fixed
// 'test/test_scene_1.js'
];
......
......@@ -29,7 +29,6 @@ namespace Channel
{
MS_TRACE();
static Json::Value empty_data(Json::objectValue);
static const Json::StaticString k_targetId("targetId");
static const Json::StaticString k_event("event");
......
......@@ -101,7 +101,7 @@ namespace Channel
static const Json::StaticString k_accepted("accepted");
static const Json::StaticString k_data("data");
MS_ASSERT(!this->replied, "Request already replied");
MS_ASSERT(this->replied == false, "Request already replied");
this->replied = true;
Json::Value json(Json::objectValue);
......@@ -136,7 +136,7 @@ namespace Channel
static const Json::StaticString k_rejected("rejected");
static const Json::StaticString k_reason("reason");
MS_ASSERT(!this->replied, "Request already replied");
MS_ASSERT(this->replied == false, "Request already replied");
this->replied = true;
Json::Value json(Json::objectValue);
......
......@@ -608,15 +608,16 @@ namespace RTC
SendPendingOutgoingDtlsData();
SetTimeout();
break;
case Role::SERVER:
MS_DEBUG("running [role:server]");
SSL_set_accept_state(this->ssl);
SSL_do_handshake(this->ssl);
break;
default:
MS_ABORT("invalid local DTLS role");
break;
}
}
......@@ -792,6 +793,8 @@ namespace RTC
case SSL_ERROR_WANT_ACCEPT:
MS_DEBUG("SSL status: SSL_ERROR_WANT_ACCEPT");
break;
default:
MS_WARN("SSL status: unknown error");
}
// Check if the handshake (or re-handshake) has been done right now.
......
......@@ -184,13 +184,9 @@ namespace RTC
{
MS_TRACE();
if (HasTuple(tuple))
return true;
else
return false;
return HasTuple(tuple) ? true : false;
}
void IceServer::RemoveTuple(RTC::TransportTuple* tuple)
{
auto it = this->tuples.begin();
......
......@@ -24,7 +24,6 @@ namespace RTC
{
Json::CharReaderBuilder builder;
Json::Value settings = Json::nullValue;
Json::Value invalid_settings;
builder.strictMode(&settings);
......
......@@ -84,8 +84,6 @@ namespace RTC
case Type::OUTBOUND:
policy.ssrc.type = ssrc_any_outbound;
break;
default:
MS_ABORT("unknown SrtpSession::Type");
}
policy.ssrc.value = 0;
......
......@@ -389,7 +389,6 @@ namespace RTC
case Channel::Request::MethodId::transport_setRemoteDtlsParameters:
{
static const Json::StaticString k_role("role");
static const Json::StaticString v_auto("auto");
static const Json::StaticString v_client("client");
static const Json::StaticString v_server("server");
static const Json::StaticString k_fingerprint("fingerprint");
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论