Bug 807012 - Signaling - reorder initiialization of CallControlManagerImpl r=jesup
authorEthan Hugg <ethanhugg@gmail.com>
Mon, 17 Dec 2012 11:01:32 -0800
changeset 121891 2ac511266b2cded3484994810ac38da0a3f0e6eb
parent 121890 34d54961cd14b7d75410653493f6e30b5c8cbed5
child 121892 852237e60012814caca184adb2692127eeb94f81
push idunknown
push userunknown
push dateunknown
reviewersjesup
bugs807012
milestone20.0a1
Bug 807012 - Signaling - reorder initiialization of CallControlManagerImpl r=jesup
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
@@ -99,18 +99,18 @@ nsresult PeerConnectionCtx::Initialize()
   //codecMask |= VCM_CODEC_RESOURCE_H264;
   codecMask |= VCM_CODEC_RESOURCE_VP8;
   //codecMask |= VCM_CODEC_RESOURCE_I420;
   mCCM->setVideoCodecs(codecMask);
 
   if (!mCCM->startSDPMode())
     return NS_ERROR_FAILURE;
 
+  mDevice = mCCM->getActiveDevice();
   mCCM->addCCObserver(this);
-  mDevice = mCCM->getActiveDevice();
   NS_ENSURE_TRUE(mDevice.get(), NS_ERROR_FAILURE);
   ChangeSipccState(PeerConnectionImpl::kStarting);
   return NS_OK;
 }
 
 nsresult PeerConnectionCtx::Cleanup() {
   CSFLogDebug(logTag, "%s", __FUNCTION__);