Commit 99ab773d authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Address cmake warning with Ubuntu

parent c724224b
...@@ -795,7 +795,7 @@ void amf_n1::registration_request_handle( ...@@ -795,7 +795,7 @@ void amf_n1::registration_request_handle(
nc.get()->serving_network = snn; nc.get()->serving_network = snn;
nc.get()->is_5g_guti_present = true; nc.get()->is_5g_guti_present = true;
nc.get()->to_be_register_by_new_suci = true; nc.get()->to_be_register_by_new_suci = true;
nc.get()->ngKsi = 100; nc.get()->ngKsi = 100 & 0xf;
// supi2amfId[("imsi-"+nc.get()->imsi)] = amf_ue_ngap_id; // supi2amfId[("imsi-"+nc.get()->imsi)] = amf_ue_ngap_id;
// supi2ranId[("imsi-"+nc.get()->imsi)] = ran_ue_ngap_id; // supi2ranId[("imsi-"+nc.get()->imsi)] = ran_ue_ngap_id;
} }
...@@ -1941,12 +1941,15 @@ void amf_n1::encode_nas_message_protected( ...@@ -1941,12 +1941,15 @@ void amf_n1::encode_nas_message_protected(
case INTEGRITY_PROTECTED_AND_CIPHERED: { case INTEGRITY_PROTECTED_AND_CIPHERED: {
bstring input = blk2bstr(input_nas_buf, input_nas_len); bstring input = blk2bstr(input_nas_buf, input_nas_len);
bstring ciphered; bstring ciphered;
//balloc(ciphered, blength(input));
nas_message_cipher_protected(nsc, NAS_MESSAGE_DOWNLINK, input, ciphered); nas_message_cipher_protected(nsc, NAS_MESSAGE_DOWNLINK, input, ciphered);
protected_nas_buf[0] = EPD_5GS_MM_MSG; protected_nas_buf[0] = EPD_5GS_MM_MSG;
protected_nas_buf[1] = INTEGRITY_PROTECTED_AND_CIPHERED; protected_nas_buf[1] = INTEGRITY_PROTECTED_AND_CIPHERED;
protected_nas_buf[6] = (uint8_t) nsc->dl_count.seq_num; protected_nas_buf[6] = (uint8_t) nsc->dl_count.seq_num;
//if (bdata(ciphered) != nullptr)
memcpy( memcpy(
&protected_nas_buf[7], (uint8_t*) bdata(ciphered), blength(ciphered)); &protected_nas_buf[7], (uint8_t*) bdata(ciphered), blength(ciphered));
uint32_t mac32; uint32_t mac32;
if (!(nas_message_integrity_protected( if (!(nas_message_integrity_protected(
nsc, NAS_MESSAGE_DOWNLINK, protected_nas_buf + 6, nsc, NAS_MESSAGE_DOWNLINK, protected_nas_buf + 6,
......
...@@ -934,8 +934,8 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -934,8 +934,8 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
plmn->getMcc(mcc); plmn->getMcc(mcc);
plmn->getMnc(mnc); plmn->getMnc(mnc);
printf( printf(
"Handover required:Target ID GlobalRanNodeID PLmn=mcc%s mnc%s " "Handover required: Target ID GlobalRanNodeID PLmn (mcc: %s, mnc: %s, "
"gnbid=%x\n", "gnbid: %ld)\n",
mcc.c_str(), mnc.c_str(), gnbid->getValue()); mcc.c_str(), mnc.c_str(), gnbid->getValue());
TAI* tai = new TAI(); TAI* tai = new TAI();
itti_msg.handvoerRequ->getTAI(tai); itti_msg.handvoerRequ->getTAI(tai);
......
...@@ -6,7 +6,7 @@ using namespace oai::amf::api; ...@@ -6,7 +6,7 @@ using namespace oai::amf::api;
void AMFApiServer::init(size_t thr) { void AMFApiServer::init(size_t thr) {
auto opts = Pistache::Http::Endpoint::options().threads(thr); auto opts = Pistache::Http::Endpoint::options().threads(thr);
opts.flags(Pistache::Tcp::Options::ReuseAddr); opts.flags(Pistache::Tcp::Options::ReuseAddr);
opts.maxPayload(PISTACHE_SERVER_MAX_PAYLOAD); opts.maxRequestSize(PISTACHE_SERVER_MAX_PAYLOAD);
m_httpEndpoint->init(opts); m_httpEndpoint->init(opts);
m_individualSubscriptionDocumentApiImpl->init(); m_individualSubscriptionDocumentApiImpl->init();
m_individualUeContextDocumentApiImpl->init(); m_individualUeContextDocumentApiImpl->init();
......
...@@ -48,7 +48,7 @@ void display_backtrace(void) { ...@@ -48,7 +48,7 @@ void display_backtrace(void) {
size = backtrace(array, 10); size = backtrace(array, 10);
strings = backtrace_symbols(array, size); strings = backtrace_symbols(array, size);
printf("Obtained %d stack frames.\n", size); printf("Obtained %ld stack frames.\n", size);
for (i = 0; i < size; i++) printf("%s\n", strings[i]); for (i = 0; i < size; i++) printf("%s\n", strings[i]);
......
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