From 853adb4246efbc747b254e6005b5c4a583cd56a7 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 12 May 2026 10:42:16 +0200 Subject: [PATCH] MT#65074 update usage of `getParameter()` Update the usage of the `getParameter()` through the modules, whereas the default value isn't given. Change-Id: I4c725639f56b70e5548fa3da321c8452675cdf99 --- apps/sbc/SBCCallProfile.cpp | 2 +- core/plug-in/uac_auth/UACAuth.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/sbc/SBCCallProfile.cpp b/apps/sbc/SBCCallProfile.cpp index 0c710928..5f6db0ac 100644 --- a/apps/sbc/SBCCallProfile.cpp +++ b/apps/sbc/SBCCallProfile.cpp @@ -363,7 +363,7 @@ bool SBCCallProfile::readFromConfiguration(const string& name, refuse_with = cfg.getParameter("refuse_with"); rtprelay_enabled = cfg.getParameter("enable_rtprelay"); - aleg_force_symmetric_rtp = cfg.getParameter("rtprelay_force_symmetric_rtp"); + aleg_force_symmetric_rtp = cfg.getParameter("rtprelay_force_symmetric_rtp","yes"); force_symmetric_rtp = aleg_force_symmetric_rtp; msgflags_symmetric_rtp = cfg.getParameter("rtprelay_msgflags_symmetric_rtp") == "yes"; diff --git a/core/plug-in/uac_auth/UACAuth.cpp b/core/plug-in/uac_auth/UACAuth.cpp index aac553ad..9cfeac2e 100644 --- a/core/plug-in/uac_auth/UACAuth.cpp +++ b/core/plug-in/uac_auth/UACAuth.cpp @@ -44,6 +44,9 @@ using std::string; #define MOD_NAME "uac_auth" +#define DEFAULT_SERVER_SECRET "CKASLD§$>NLKJSLDKFJ" + + EXPORT_SESSION_EVENT_HANDLER_FACTORY(UACAuthFactory, MOD_NAME); EXPORT_PLUGIN_CLASS_FACTORY(UACAuthFactory, MOD_NAME); @@ -100,7 +103,7 @@ int UACAuthFactory::onLoad() cfg_file_path.c_str()); secret = AmSession::getNewId(); // ?? TODO: is this cryptoproof? } else { - secret = conf.getParameter("server_secret"); + secret = conf.getParameter("server_secret",DEFAULT_SERVER_SECRET); if (secret.size()<5) { ERROR("server_secret in '%s' too short!\n", cfg_file_path.c_str()); return -1;