From d63305fb820e1ddd37f5831938d585ff31e8bb2c Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Fri, 25 Apr 2025 14:27:49 +0200 Subject: [PATCH] MT#59962 ModSbc: `profile_param` can be only one Don't do an extra job many times checking what is the `profile_param`, just catch this once. Hence conditions must be self-excluding. Change-Id: I6d98a082e50777c995538fd6303eb0fe527b301b --- apps/dsm/mods/mod_sbc/ModSbc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dsm/mods/mod_sbc/ModSbc.cpp b/apps/dsm/mods/mod_sbc/ModSbc.cpp index d1189490..5067d1b8 100644 --- a/apps/dsm/mods/mod_sbc/ModSbc.cpp +++ b/apps/dsm/mods/mod_sbc/ModSbc.cpp @@ -308,7 +308,7 @@ EXEC_ACTION_START(MODSBCActionProfileSet) { EXEC_ACTION_STOP; } - if (profile_param == "aleg_rtprelay_interface") { + else if (profile_param == "aleg_rtprelay_interface") { profile->aleg_rtprelay_interface=value; if (!profile->evaluateRTPRelayAlegInterface()) { sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG); @@ -319,13 +319,13 @@ EXEC_ACTION_START(MODSBCActionProfileSet) { EXEC_ACTION_STOP; } - if (profile_param == "message_filter") { + else if (profile_param == "message_filter") { mf.filter_type = String2FilterType(value.c_str()); DBG("message_filter set to '%s'\n", value.c_str()); EXEC_ACTION_STOP; } - if (profile_param == "message_list") { + else if (profile_param == "message_list") { vector elems = explode(value, ","); for (vector::iterator it=elems.begin(); it != elems.end(); it++) mf.filter_list.insert(*it);