Skip to content

Commit

Permalink
Update src/impl/peerconnection.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Paul-Louis Ageneau <[email protected]>
  • Loading branch information
Sean-Der and paullouisageneau authored Jan 8, 2024
1 parent 6a2e87c commit 1ef68d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,8 @@ void PeerConnection::rollbackLocalDescription() {

bool PeerConnection::checkFingerprint(const std::string &fingerprint) const {
std::lock_guard lock(mRemoteDescriptionMutex);
std::string expectedFingerprint = "[none]";
if (mRemoteDescription && mRemoteDescription->fingerprint().has_value()) {
expectedFingerprint = mRemoteDescription->fingerprint().value().value;
}

if (expectedFingerprint == fingerprint) {
auto expectedFingerprint = mRemoteDescription && mRemoteDescription->fingerprint() ? mRemoteDescription->fingerprint().value : nullopt;
if (expectedFingerprint && *expectedFingerprint == fingerprint) {
PLOG_VERBOSE << "Valid fingerprint \"" << fingerprint << "\"";
return true;
}
Expand Down

0 comments on commit 1ef68d5

Please sign in to comment.