mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
WebRTC: Error message carries the SDP when failed. v5.0.151, v6.0.39 (#3450)
Co-authored-by: winlin <winlin@vip.126.com> Co-authored-by: ChenGH <chengh_math@126.com>
This commit is contained in:
parent
b34255c3d0
commit
571043ff3d
5 changed files with 14 additions and 10 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 6.0 Changelog
|
||||
|
||||
* v6.0, 2023-03-27, Merge [#3450](https://github.com/ossrs/srs/pull/3450): WebRTC: Error message carries the SDP when failed. v6.0.39 (#3450)
|
||||
* v6.0, 2023-03-25, Merge [#3477](https://github.com/ossrs/srs/pull/3477): Remove unneccessary NULL check in srs_freep. v6.0.38 (#3477)
|
||||
* v6.0, 2023-03-25, Merge [#3455](https://github.com/ossrs/srs/pull/3455): RTC: Call on_play before create session, for it might be freed for timeout. v6.0.37 (#3455)
|
||||
* v6.0, 2023-03-22, Merge [#3427](https://github.com/ossrs/srs/pull/3427): WHIP: Support DELETE resource for Larix Broadcaster. v6.0.36 (#3427)
|
||||
|
@ -52,6 +53,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 5.0 Changelog
|
||||
|
||||
* v5.0, 2023-03-27, Merge [#3450](https://github.com/ossrs/srs/pull/3450): WebRTC: Error message carries the SDP when failed. v5.0.151 (#3450)
|
||||
* v5.0, 2023-03-25, Merge [#3477](https://github.com/ossrs/srs/pull/3477): Remove unneccessary NULL check in srs_freep. v5.0.150 (#3477)
|
||||
* v5.0, 2023-03-25, Merge [#3455](https://github.com/ossrs/srs/pull/3455): RTC: Call on_play before create session, for it might be freed for timeout. v5.0.149 (#3455)
|
||||
* v5.0, 2023-03-22, Merge [#3427](https://github.com/ossrs/srs/pull/3427): WHIP: Support DELETE resource for Larix Broadcaster. v5.0.148 (#3427)
|
||||
|
|
|
@ -1896,7 +1896,7 @@ srs_error_t SrsRtcConnection::add_publisher(SrsRtcUserConfig* ruc, SrsSdp& local
|
|||
|
||||
// TODO: FIXME: Change to api of stream desc.
|
||||
if ((err = negotiate_publish_capability(ruc, stream_desc)) != srs_success) {
|
||||
return srs_error_wrap(err, "publish negotiate, offer=%s", ruc->remote_sdp_str_.c_str());
|
||||
return srs_error_wrap(err, "publish negotiate, offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str());
|
||||
}
|
||||
|
||||
if ((err = generate_publish_local_sdp(req, local_sdp, stream_desc, ruc->remote_sdp_.is_unified(), ruc->audio_before_video_)) != srs_success) {
|
||||
|
@ -1935,7 +1935,7 @@ srs_error_t SrsRtcConnection::add_player(SrsRtcUserConfig* ruc, SrsSdp& local_sd
|
|||
|
||||
std::map<uint32_t, SrsRtcTrackDescription*> play_sub_relations;
|
||||
if ((err = negotiate_play_capability(ruc, play_sub_relations)) != srs_success) {
|
||||
return srs_error_wrap(err, "play negotiate, offer=%s", ruc->remote_sdp_str_.c_str());
|
||||
return srs_error_wrap(err, "play negotiate, offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str());
|
||||
}
|
||||
|
||||
if (!play_sub_relations.size()) {
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 150
|
||||
#define VERSION_REVISION 151
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 38
|
||||
#define VERSION_REVISION 39
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
const int maxLogBuf = 4 * 1024 * 1024;
|
||||
|
||||
#if defined(SRS_BACKTRACE) && defined(__linux)
|
||||
#include <execinfo.h>
|
||||
#include <dlfcn.h>
|
||||
|
@ -264,8 +266,8 @@ SrsCplxError* SrsCplxError::create(const char* func, const char* file, int line,
|
|||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
static char buffer[4096];
|
||||
int r0 = vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
||||
static char* buffer = new char[maxLogBuf];
|
||||
int r0 = vsnprintf(buffer, maxLogBuf, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
SrsCplxError* err = new SrsCplxError();
|
||||
|
@ -275,7 +277,7 @@ SrsCplxError* SrsCplxError::create(const char* func, const char* file, int line,
|
|||
err->line = line;
|
||||
err->code = code;
|
||||
err->rerrno = rerrno;
|
||||
if (r0 > 0 && r0 < (int)sizeof(buffer)) {
|
||||
if (r0 > 0 && r0 < maxLogBuf) {
|
||||
err->msg = string(buffer, r0);
|
||||
}
|
||||
err->wrapped = NULL;
|
||||
|
@ -291,8 +293,8 @@ SrsCplxError* SrsCplxError::wrap(const char* func, const char* file, int line, S
|
|||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
static char buffer[4096];
|
||||
int r0 = vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
||||
static char* buffer = new char[maxLogBuf];
|
||||
int r0 = vsnprintf(buffer, maxLogBuf, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
SrsCplxError* err = new SrsCplxError();
|
||||
|
@ -304,7 +306,7 @@ SrsCplxError* SrsCplxError::wrap(const char* func, const char* file, int line, S
|
|||
err->code = v->code;
|
||||
}
|
||||
err->rerrno = rerrno;
|
||||
if (r0 > 0 && r0 < (int)sizeof(buffer)) {
|
||||
if (r0 > 0 && r0 < maxLogBuf) {
|
||||
err->msg = string(buffer, r0);
|
||||
}
|
||||
err->wrapped = v;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue