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
2014-03-26 11:39:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e02293d94dc7222ec8da14a317cec632b65b9390
e02293d9
1 parent
1386e7a8
fix bug of handshake with nginx-rtmp for forward, change to 0.9.33
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
6 行增加
和
14 行删除
trunk/src/core/srs_core.hpp
trunk/src/rtmp/srs_protocol_handshake.cpp
trunk/src/core/srs_core.hpp
查看文件 @
e02293d
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "3
2
"
#define VERSION_REVISION "3
3
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"
...
...
trunk/src/rtmp/srs_protocol_handshake.cpp
查看文件 @
e02293d
...
...
@@ -767,7 +767,7 @@ namespace srs
destroy_blocks
();
time
=
::
time
(
NULL
);
version
=
0x0
207008
0
;
// client c1 version
version
=
0x0
000000
0
;
// client c1 version
if
(
_schema
==
srs_schema0
)
{
srs_key_block_init
(
&
block0
.
key
);
...
...
@@ -1005,8 +1005,6 @@ int SrsSimpleHandshake::handshake_with_client(SrsHandshakeBytes* hs_bytes, ISrsP
return
ret
;
}
// plain text required.
hs_bytes
->
s0s1s2
[
0
]
=
0x03
;
if
((
ret
=
io
->
write
(
hs_bytes
->
s0s1s2
,
3073
,
&
nsize
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"simple handshake send s0s1s2 failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -1032,8 +1030,6 @@ int SrsSimpleHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrsP
if
((
ret
=
hs_bytes
->
create_c0c1
())
!=
ERROR_SUCCESS
)
{
return
ret
;
}
// plain text required.
hs_bytes
->
c0c1
[
0
]
=
0x03
;
if
((
ret
=
io
->
write
(
hs_bytes
->
c0c1
,
1537
,
&
nsize
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"write c0c1 failed. ret=%d"
,
ret
);
...
...
@@ -1147,8 +1143,6 @@ int SrsComplexHandshake::handshake_with_client(SrsHandshakeBytes* hs_bytes, ISrs
if
((
ret
=
hs_bytes
->
create_s0s1s2
())
!=
ERROR_SUCCESS
)
{
return
ret
;
}
// plain text required.
hs_bytes
->
s0s1s2
[
0
]
=
0x03
;
s1
.
dump
(
hs_bytes
->
s0s1s2
+
1
);
s2
.
dump
(
hs_bytes
->
s0s1s2
+
1537
);
if
((
ret
=
io
->
write
(
hs_bytes
->
s0s1s2
,
3073
,
&
nsize
))
!=
ERROR_SUCCESS
)
{
...
...
@@ -1191,8 +1185,6 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
if
((
ret
=
hs_bytes
->
create_c0c1
())
!=
ERROR_SUCCESS
)
{
return
ret
;
}
// plain text required.
hs_bytes
->
c0c1
[
0
]
=
0x03
;
// sign c1
c1s1
c1
;
...
...
@@ -1230,10 +1222,10 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
if
((
ret
=
s1
.
parse
(
hs_bytes
->
s0s1s2
+
1
,
c1
.
schema
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
if
((
ret
=
s1
.
s1_validate_digest
(
is_valid
))
!=
ERROR_SUCCESS
||
!
is_valid
)
{
ret
=
ERROR_RTMP_TRY_SIMPLE_HS
;
return
ret
;
}
// never verify the s1,
// for if forward to nginx-rtmp, verify s1 will failed,
// TODO: FIXME: find the handshake schema of nginx-rtmp.
// c2
if
((
ret
=
hs_bytes
->
create_c2
())
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论