mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '4.0release' into merge/develop
This commit is contained in:
commit
f6c7a92fa0
5 changed files with 17 additions and 4 deletions
|
@ -115,7 +115,7 @@ void SrsResourceManager::add(ISrsResource* conn, bool* exists)
|
|||
conns_.push_back(conn);
|
||||
} else {
|
||||
if (exists) {
|
||||
*exists = false;
|
||||
*exists = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ srs_error_t SrsSessionInfo::encode(std::ostringstream& os)
|
|||
return err;
|
||||
}
|
||||
|
||||
bool SrsSessionInfo::operator=(const SrsSessionInfo& rhs)
|
||||
bool SrsSessionInfo::operator==(const SrsSessionInfo& rhs)
|
||||
{
|
||||
return ice_ufrag_ == rhs.ice_ufrag_ &&
|
||||
ice_pwd_ == rhs.ice_pwd_ &&
|
||||
|
@ -155,6 +155,16 @@ bool SrsSessionInfo::operator=(const SrsSessionInfo& rhs)
|
|||
setup_ == rhs.setup_;
|
||||
}
|
||||
|
||||
SrsSessionInfo &SrsSessionInfo::operator=(SrsSessionInfo other) {
|
||||
std::swap(ice_ufrag_, other.ice_ufrag_);
|
||||
std::swap(ice_pwd_, other.ice_pwd_);
|
||||
std::swap(ice_options_, other.ice_options_);
|
||||
std::swap(fingerprint_algo_, other.fingerprint_algo_);
|
||||
std::swap(fingerprint_, other.fingerprint_);
|
||||
std::swap(setup_, other.setup_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SrsSSRCInfo::SrsSSRCInfo()
|
||||
{
|
||||
ssrc_ = 0;
|
||||
|
|
|
@ -36,7 +36,9 @@ public:
|
|||
srs_error_t parse_attribute(const std::string& attribute, const std::string& value);
|
||||
srs_error_t encode(std::ostringstream& os);
|
||||
|
||||
bool operator=(const SrsSessionInfo& rhs);
|
||||
bool operator==(const SrsSessionInfo& rhs);
|
||||
// user-defined copy assignment (copy-and-swap idiom)
|
||||
SrsSessionInfo& operator=(SrsSessionInfo other);
|
||||
public:
|
||||
std::string ice_ufrag_;
|
||||
std::string ice_pwd_;
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 153
|
||||
#define VERSION_REVISION 154
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue