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