Commit 66728d53 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'fix_sst_conf_file' into 'develop'

Update SST type (int instead of string) in conf file

See merge request oai/cn5g/oai-cn5g-amf!164
parents 849c04d3 3e285c4f
......@@ -49,9 +49,9 @@ AMF =
{
MCC = "@PLMN_SUPPORT_MCC@"; MNC = "@PLMN_SUPPORT_MNC@"; TAC = @PLMN_SUPPORT_TAC@;
SLICE_SUPPORT_LIST = (
{SST = "@SST_0@"; SD = "@SD_0@"},
{SST = "@SST_1@"; SD = "@SD_1@"},
{SST = "@SST_2@"; SD = "@SD_2@"}
{SST = @SST_0@; SD = "@SD_0@"},
{SST = @SST_1@; SD = "@SD_1@"},
{SST = @SST_2@; SD = "@SD_2@"}
)
}
);
......
......@@ -217,13 +217,13 @@ int amf_config::load(const std::string& config_file) {
for (int j = 0; j < numOfSlice; j++) {
slice_t slice;
const Setting& slice_item = slice_list_cfg[j];
std::string sst = {};
unsigned int sst = 0;
std::string sd = {};
slice_item.lookupValue(AMF_CONFIG_STRING_SST, sst);
slice.sst = sst;
slice_item.lookupValue(AMF_CONFIG_STRING_SD, sd);
slice.sd = SD_NO_VALUE; // Default value
try {
slice.sst = std::stoi(sst);
conv::sd_string_to_int(sd, slice.sd);
} catch (const std::exception& err) {
Logger::amf_app().error("Invalid SST/SD");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment