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

2.0.13: Avoid crash when no remote IP/port is given.

上级 b3b4a944
# Changelog
### 2.0.13
* Avoid crash when no remote IP/port is given.
### 2.0.12
* Add `handled` and `unhandled` events to `Consumer`.
......
{
"name": "mediasoup",
"version": "2.0.12",
"version": "2.0.13",
"description": "Cutting Edge WebRTC Video Conferencing",
"author": "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
"contributors": [
......
......@@ -257,12 +257,21 @@ namespace RTC
RTC::PlainRtpTransport::Options options;
if (!request->data[JsonStringRemoteIP].isString())
MS_THROW_ERROR("missing remoteIP");
{
request->Reject("missing remoteIP");
return;
}
options.remoteIP = request->data[JsonStringRemoteIP].asString();
if (!request->data[JsonStringRemotePort].isUInt())
MS_THROW_ERROR("missing remotePort");
{
request->Reject("missing remotePort");
return;
}
options.remotePort = request->data[JsonStringRemotePort].asUInt();
RTC::PlainRtpTransport* plainRtpTransport;
......@@ -849,12 +858,20 @@ namespace RTC
RTC::Transport::MirroringOptions options;
if (!request->data[JsonStringRemoteIP].isString())
MS_THROW_ERROR("missing remoteIP");
{
request->Reject("missing remoteIP");
return;
}
options.remoteIP = request->data[JsonStringRemoteIP].asString();
if (!request->data[JsonStringRemotePort].isUInt())
MS_THROW_ERROR("missing remotePort");
{
request->Reject("missing remotePort");
return;
}
options.remotePort = request->data[JsonStringRemotePort].asUInt();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论