donot ensure transaction-id===1 for connect req/res, change to 0.9.41
正在显示
2 个修改的文件
包含
9 行增加
和
5 行删除
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
| 33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
| 34 | -#define VERSION_REVISION "40" | 34 | +#define VERSION_REVISION "41" |
| 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "srs" | 37 | #define RTMP_SIG_SRS_KEY "srs" |
| @@ -1752,11 +1752,13 @@ int SrsConnectAppPacket::decode(SrsStream* stream) | @@ -1752,11 +1752,13 @@ int SrsConnectAppPacket::decode(SrsStream* stream) | ||
| 1752 | srs_error("amf0 decode connect transaction_id failed. ret=%d", ret); | 1752 | srs_error("amf0 decode connect transaction_id failed. ret=%d", ret); |
| 1753 | return ret; | 1753 | return ret; |
| 1754 | } | 1754 | } |
| 1755 | + | ||
| 1756 | + // some client donot send id=1.0, so we only warn user if not match. | ||
| 1755 | if (transaction_id != 1.0) { | 1757 | if (transaction_id != 1.0) { |
| 1756 | ret = ERROR_RTMP_AMF0_DECODE; | 1758 | ret = ERROR_RTMP_AMF0_DECODE; |
| 1757 | - srs_error("amf0 decode connect transaction_id failed. " | 1759 | + srs_warn("amf0 decode connect transaction_id failed. " |
| 1758 | "required=%.1f, actual=%.1f, ret=%d", 1.0, transaction_id, ret); | 1760 | "required=%.1f, actual=%.1f, ret=%d", 1.0, transaction_id, ret); |
| 1759 | - return ret; | 1761 | + ret = ERROR_SUCCESS; |
| 1760 | } | 1762 | } |
| 1761 | 1763 | ||
| 1762 | if ((ret = command_object->read(stream)) != ERROR_SUCCESS) { | 1764 | if ((ret = command_object->read(stream)) != ERROR_SUCCESS) { |
| @@ -1845,11 +1847,13 @@ int SrsConnectAppResPacket::decode(SrsStream* stream) | @@ -1845,11 +1847,13 @@ int SrsConnectAppResPacket::decode(SrsStream* stream) | ||
| 1845 | srs_error("amf0 decode connect transaction_id failed. ret=%d", ret); | 1847 | srs_error("amf0 decode connect transaction_id failed. ret=%d", ret); |
| 1846 | return ret; | 1848 | return ret; |
| 1847 | } | 1849 | } |
| 1850 | + | ||
| 1851 | + // some client donot send id=1.0, so we only warn user if not match. | ||
| 1848 | if (transaction_id != 1.0) { | 1852 | if (transaction_id != 1.0) { |
| 1849 | ret = ERROR_RTMP_AMF0_DECODE; | 1853 | ret = ERROR_RTMP_AMF0_DECODE; |
| 1850 | - srs_error("amf0 decode connect transaction_id failed. " | 1854 | + srs_warn("amf0 decode connect transaction_id failed. " |
| 1851 | "required=%.1f, actual=%.1f, ret=%d", 1.0, transaction_id, ret); | 1855 | "required=%.1f, actual=%.1f, ret=%d", 1.0, transaction_id, ret); |
| 1852 | - return ret; | 1856 | + ret = ERROR_SUCCESS; |
| 1853 | } | 1857 | } |
| 1854 | 1858 | ||
| 1855 | if ((ret = props->read(stream)) != ERROR_SUCCESS) { | 1859 | if ((ret = props->read(stream)) != ERROR_SUCCESS) { |
-
请 注册 或 登录 后发表评论