From 8fbacbbca3e1d7a1f5f6343e84d99314dd70dbf6 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 17 Feb 2025 17:46:25 +0100 Subject: [PATCH] MT#62063 trixie: updateHoldMethod, default NonHold Consider RecvonlyStream and None (sendrecv) hold types as NonHold methods. Fixes: 16: 52:44 CallLeg.cpp: In member function 'CallLeg::holdMethod CallLeg::updateHoldMethod(const AmSdp&)': 16: 52:44 CallLeg.cpp:1421:10: warning: enumeration value 'None' not handled in switch [-Wswitch] 16: 52:44 1421 | switch (hold_method) 16: 52:44 | ^ Change-Id: I2021dd7152ad258e03c28c56cb3b0c7a5e363266 --- apps/sbc/CallLeg.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/sbc/CallLeg.cpp b/apps/sbc/CallLeg.cpp index 9c3ecdc6..7eb435ce 100644 --- a/apps/sbc/CallLeg.cpp +++ b/apps/sbc/CallLeg.cpp @@ -1413,11 +1413,11 @@ void CallLeg::updateCallStatus(CallStatus new_status, const StatusChangeCause &c CallLeg::holdMethod CallLeg::updateHoldMethod(const AmSdp &sdp) { - holdMethod hold_method = None; + holdMethod hold_method; + /* just get the hold method */ isHoldRequest(sdp, hold_method); - /* SendRecv are considered as NonHold */ - hold_type_requested = NonHold; + switch (hold_method) { case SendonlyStream: @@ -1429,10 +1429,12 @@ CallLeg::holdMethod CallLeg::updateHoldMethod(const AmSdp &sdp) case ZeroedConnection: hold_type_requested = ZeroedHold; break; - case RecvonlyStream: + /* RecvonlyStream, None and sendrecv cases considered as non-holding */ + default: hold_type_requested = NonHold; break; } + if (hold_type_requested != NonHold) { DBG("hold_type_requested is set to: <%d> for LT <%s>\n", hold_type_requested, getLocalTag().c_str());