Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-06 10:16:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
89c0170850dc1f9955b33159462fda63a910230f
89c01708
1 parent
8c5661b9
fix bug of forward, earse the forwarded msgs.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
24 行增加
和
4 行删除
trunk/src/core/srs_core_forward.cpp
trunk/src/core/srs_core_forward.cpp
查看文件 @
89c0170
...
...
@@ -292,7 +292,11 @@ int SrsForwarder::forward()
}
}
// ignore when no messages.
int
count
=
(
int
)
msgs
.
size
();
if
(
msgs
.
empty
())
{
continue
;
}
// reportable
if
(
pithy_print
.
can_print
())
{
...
...
@@ -301,16 +305,32 @@ int SrsForwarder::forward()
}
// all msgs to forward.
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
int
i
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
SrsSharedPtrMessage
*
msg
=
msgs
[
i
];
msgs
[
i
]
=
NULL
;
// we erased the sendout messages, the msg must not be NULL.
srs_assert
(
msg
);
if
((
ret
=
client
->
send_message
(
msg
))
!=
ERROR_SUCCESS
)
{
ret
=
client
->
send_message
(
msg
);
if
(
ret
!=
ERROR_SUCCESS
)
{
srs_error
(
"forwarder send message to server failed. ret=%d"
,
ret
);
return
ret
;
break
;
}
}
msgs
.
clear
();
// clear sendout mesages.
if
(
i
<
count
)
{
srs_warn
(
"clear forwarded msg, total=%d, forwarded=%d, ret=%d"
,
count
,
i
,
ret
);
}
else
{
srs_info
(
"clear forwarded msg, total=%d, forwarded=%d, ret=%d"
,
count
,
i
,
ret
);
}
msgs
.
erase
(
msgs
.
begin
(),
msgs
.
begin
()
+
i
);
if
(
ret
!=
ERROR_SUCCESS
)
{
break
;
}
}
return
ret
;
...
...
请
注册
或
登录
后发表评论