Bug 1293172: improve DTLS handshake error message. r=mt draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Sun, 07 Aug 2016 22:34:41 -0700
changeset 397739 690ec762844950c7aff2f7382d48de67a7f5e786
parent 397688 763fe887c37cee5fcfe0f00e94fdffc84a41ea1c
child 527524 7ef10d6af049b2d70a8e1f8c410b171749fa3e24
push id25375
push userdrno@ohlmeier.org
push dateMon, 08 Aug 2016 06:31:44 +0000
reviewersmt
bugs1293172
milestone51.0a1
Bug 1293172: improve DTLS handshake error message. r=mt MozReview-Commit-ID: GM28RvCQ3O4
media/mtransport/transportlayerdtls.cpp
--- a/media/mtransport/transportlayerdtls.cpp
+++ b/media/mtransport/transportlayerdtls.cpp
@@ -882,17 +882,19 @@ void TransportLayerDtls::Handshake() {
                     LAYER_INFO << "Setting DTLS timeout to " << timeout_ms);
           timer_->SetTarget(target_);
           timer_->InitWithFuncCallback(TimerCallback,
                                        this, timeout_ms,
                                        nsITimer::TYPE_ONE_SHOT);
         }
         break;
       default:
-        MOZ_MTLOG(ML_ERROR, LAYER_INFO << "SSL handshake error "<< err);
+        const char *err_msg = PR_ErrorToName(err);
+        MOZ_MTLOG(ML_ERROR, LAYER_INFO << "DTLS handshake error " << err << " ("
+                  << err_msg << ")");
         TL_SET_STATE(TS_ERROR);
         break;
     }
   }
 }
 
 // Checks if ALPN was negotiated correctly and returns false if it wasn't.
 // After this returns successfully, alpn_ will be set to the negotiated