Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
f451275c
提交
f451275c
authored
11月 14, 2023
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cosmetic: C++: add some brackets in if conditions
上级
e441bb28
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
0 行删除
+20
-0
DepLibSRTP.cpp
worker/src/DepLibSRTP.cpp
+2
-0
DepLibUV.cpp
worker/src/DepLibUV.cpp
+8
-0
DepUsrSCTP.cpp
worker/src/DepUsrSCTP.cpp
+10
-0
没有找到文件。
worker/src/DepLibSRTP.cpp
浏览文件 @
f451275c
...
...
@@ -59,7 +59,9 @@ void DepLibSRTP::ClassInit()
const
srtp_err_status_t
err
=
srtp_init
();
if
(
DepLibSRTP
::
IsError
(
err
))
{
MS_THROW_ERROR
(
"srtp_init() failed: %s"
,
DepLibSRTP
::
GetErrorString
(
err
));
}
}
++
globalInstances
;
...
...
worker/src/DepLibUV.cpp
浏览文件 @
f451275c
...
...
@@ -27,7 +27,9 @@ inline static void onWalk(uv_handle_t* handle, void* /*arg*/)
uv_has_ref
(
handle
));
if
(
!
uv_is_closing
(
handle
))
{
uv_close
(
handle
,
onCloseLoop
);
}
}
/* Static methods. */
...
...
@@ -41,7 +43,9 @@ void DepLibUV::ClassInit()
const
int
err
=
uv_loop_init
(
DepLibUV
::
loop
);
if
(
err
!=
0
)
{
MS_ABORT
(
"libuv loop initialization failed"
);
}
}
void
DepLibUV
::
ClassDestroy
()
...
...
@@ -63,13 +67,17 @@ void DepLibUV::ClassDestroy()
err
=
uv_loop_close
(
DepLibUV
::
loop
);
if
(
err
!=
UV_EBUSY
)
{
break
;
}
uv_run
(
DepLibUV
::
loop
,
UV_RUN_NOWAIT
);
}
if
(
err
!=
0
)
{
MS_ERROR_STD
(
"failed to close libuv loop: %s"
,
uv_err_name
(
err
));
}
delete
DepLibUV
::
loop
;
}
...
...
worker/src/DepUsrSCTP.cpp
浏览文件 @
f451275c
...
...
@@ -127,7 +127,9 @@ uintptr_t DepUsrSCTP::GetNextSctpAssociationId()
// NOTE: usrsctp_connect() fails with a value of 0.
if
(
DepUsrSCTP
::
nextSctpAssociationId
==
0u
)
{
++
DepUsrSCTP
::
nextSctpAssociationId
;
}
// In case we've wrapped around and need to find an empty spot from a removed
// SctpAssociation. Assumes we'll never be full.
...
...
@@ -137,7 +139,9 @@ uintptr_t DepUsrSCTP::GetNextSctpAssociationId()
++
DepUsrSCTP
::
nextSctpAssociationId
;
if
(
DepUsrSCTP
::
nextSctpAssociationId
==
0u
)
{
++
DepUsrSCTP
::
nextSctpAssociationId
;
}
}
return
DepUsrSCTP
::
nextSctpAssociationId
++
;
...
...
@@ -160,7 +164,9 @@ void DepUsrSCTP::RegisterSctpAssociation(RTC::SctpAssociation* sctpAssociation)
DepUsrSCTP
::
mapIdSctpAssociation
[
sctpAssociation
->
id
]
=
sctpAssociation
;
if
(
++
DepUsrSCTP
::
numSctpAssociations
==
1u
)
{
DepUsrSCTP
::
checker
->
Start
();
}
}
void
DepUsrSCTP
::
DeregisterSctpAssociation
(
RTC
::
SctpAssociation
*
sctpAssociation
)
...
...
@@ -177,7 +183,9 @@ void DepUsrSCTP::DeregisterSctpAssociation(RTC::SctpAssociation* sctpAssociation
MS_ASSERT
(
DepUsrSCTP
::
numSctpAssociations
>
0u
,
"numSctpAssociations was not higher than 0"
);
if
(
--
DepUsrSCTP
::
numSctpAssociations
==
0u
)
{
DepUsrSCTP
::
checker
->
Stop
();
}
}
RTC
::
SctpAssociation
*
DepUsrSCTP
::
RetrieveSctpAssociation
(
uintptr_t
id
)
...
...
@@ -189,7 +197,9 @@ RTC::SctpAssociation* DepUsrSCTP::RetrieveSctpAssociation(uintptr_t id)
auto
it
=
DepUsrSCTP
::
mapIdSctpAssociation
.
find
(
id
);
if
(
it
==
DepUsrSCTP
::
mapIdSctpAssociation
.
end
())
{
return
nullptr
;
}
return
it
->
second
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论