Bug 800343 - Cast nsresult to uint32_t to output to streams; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Thu, 11 Oct 2012 14:48:31 +0200
changeset 110208 bab48a4742e75d7531447c29b9a42dfd82980293
parent 110207 d419defdd4254aff4230a15ed8d581dc3f84cb3d
child 110209 81be299f50041cba2a6e3fec7bd3079346eb74e2
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersehsan
bugs800343
milestone19.0a1
Bug 800343 - Cast nsresult to uint32_t to output to streams; r=ehsan
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -451,17 +451,18 @@ PeerConnectionImpl::Initialize(IPeerConn
 
   // Start gathering
   nsresult res;
   mIceCtx->thread()->Dispatch(WrapRunnableRet(
     mIceCtx, &NrIceCtx::StartGathering, &res), NS_DISPATCH_SYNC
   );
 
   if (NS_FAILED(res)) {
-    CSFLogErrorS(logTag, __FUNCTION__ << ": StartGathering failed: " << res);
+    CSFLogErrorS(logTag, __FUNCTION__ << ": StartGathering failed: " <<
+        static_cast<uint32_t>(res));
     return res;
   }
 
   // Store under mHandle
   mCall->setPeerConnection(mHandle);
   peerconnections[mHandle] = this;
 
   // Create the DTLS Identity
@@ -477,28 +478,30 @@ PeerConnectionImpl::Initialize(IPeerConn
   unsigned char fingerprint[DTLS_FINGERPRINT_LENGTH];
   size_t fingerprint_length;
   res = mIdentity->ComputeFingerprint("sha-1",
                                       fingerprint,
                                       sizeof(fingerprint),
                                       &fingerprint_length);
 
   if (NS_FAILED(res)) {
-    CSFLogErrorS(logTag, __FUNCTION__ << ": ComputeFingerprint failed: " << res);
+    CSFLogErrorS(logTag, __FUNCTION__ << ": ComputeFingerprint failed: " <<
+        static_cast<uint32_t>(res));
     return res;
   }
 
   mFingerprint = "sha-1 " + mIdentity->FormatFingerprint(fingerprint,
                                                          fingerprint_length);
 
   // Find the STS thread
   mSTSThread = do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &res);
 
   if (NS_FAILED(res)) {
-    CSFLogErrorS(logTag, __FUNCTION__ << ": do_GetService failed: " << res);
+    CSFLogErrorS(logTag, __FUNCTION__ << ": do_GetService failed: " <<
+        static_cast<uint32_t>(res));
     return res;
   }
 
 #ifndef MOZILLA_INTERNAL_API
   // Busy-wait until we are ready, for C++ unit tests. Remove when tests are fixed.
   CSFLogDebugS(logTag, __FUNCTION__ << ": Sleeping until kStarted");
   while(PeerConnectionCtx::GetInstance()->sipcc_state() != kStarted) {
     PR_Sleep(100);