Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Unified Diff: remoting/protocol/jingle_session.cc

Issue 7312013: Minor cleanups in JingleSession and JingleSessionManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/jingle_session_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index 90a1a7703e7762d8c260dcd37eb751621ceeb45b..2726365f89cbd8e7e6b8fe0ae4c13ea9671eba5d 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -159,7 +159,9 @@ JingleSession::JingleSession(
}
JingleSession::~JingleSession() {
- DCHECK(closed_);
+ // Reset the callback so that it's not called from Close().
+ state_change_callback_.reset();
+ Close();
jingle_session_manager_->SessionDestroyed(this);
}
@@ -212,8 +214,11 @@ void JingleSession::CloseInternal(int result, bool failed) {
if (video_rtcp_channel_.get())
video_rtcp_channel_->Close(result);
- if (cricket_session_)
+ if (cricket_session_) {
cricket_session_->Terminate();
+ cricket_session_->SignalState.disconnect(this);
+ cricket_session_ = NULL;
+ }
if (failed)
SetState(FAILED);
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/jingle_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698