From 8e814d79063c30435ef3bfa0da40661ba0846c94 Mon Sep 17 00:00:00 2001 From: deadbeef Date: Fri, 13 Jan 2017 11:34:39 -0800 Subject: [PATCH] Provide better message for when RTCP mux "require" policy is triggered. Previously: Failed to setup RTCP mux filter. Now: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'. BUG=webrtc:6966 Review-Url: https://codereview.webrtc.org/2622553003 Cr-Commit-Position: refs/heads/master@{#16062} --- webrtc/pc/channel.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc index 942e8267cb..4d3f616212 100644 --- a/webrtc/pc/channel.cc +++ b/webrtc/pc/channel.cc @@ -1166,6 +1166,15 @@ bool BaseChannel::SetRtcpMux_n(bool enable, ContentAction action, ContentSource src, std::string* error_desc) { + // Provide a more specific error message for the RTCP mux "require" policy + // case. + if (rtcp_mux_required_ && !enable) { + SafeSetError( + "rtcpMuxPolicy is 'require', but media description does not " + "contain 'a=rtcp-mux'.", + error_desc); + return false; + } bool ret = false; switch (action) { case CA_OFFER: