Commit eaed3191 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'fix_dnn_case_insensitive' into 'develop'

Use lower-case for DNN value (case insensitive)

See merge request oai/cn5g/oai-cn5g-amf!177
parents 29abe22b 9548a3d1
......@@ -3335,6 +3335,9 @@ void amf_n1::ul_nas_transport_handle(
// TODO: use default DNN for the corresponding NSSAI
}
// Use DNN as case insensitive
conv::to_lower(dnn);
comUt::print_buffer(
"amf_n1", "Decoded DNN Bit String", (uint8_t*) bdata(dnn),
blength(dnn));
......
......@@ -451,6 +451,15 @@ bool conv::octet_string_copy(
return true;
}
//------------------------------------------------------------------------------
void conv::to_lower(std::string& str) {
boost::algorithm::to_lower(str);
}
//------------------------------------------------------------------------------
void conv::to_lower(bstring& b_str) {
btolower(b_str);
}
//------------------------------------------------------------------------------
bool conv::check_bstring(const bstring& b_str) {
if (b_str == nullptr || b_str->slen < 0 || b_str->data == nullptr)
......
......@@ -89,6 +89,9 @@ class conv {
static bool octet_string_copy(
OCTET_STRING_t& destination, const OCTET_STRING_t& source);
static void to_lower(std::string& str);
static void to_lower(bstring& b_str);
static bool check_bstring(const bstring& b_str);
static bool check_octet_string(const OCTET_STRING_t& octet_str);
......
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