Commit 2bfc95f2 authored by Niuhaiwen's avatar Niuhaiwen

fix bugs

parent 222896e9
...@@ -176,7 +176,7 @@ long amf_app::generate_amf_ue_ngap_id() { ...@@ -176,7 +176,7 @@ long amf_app::generate_amf_ue_ngap_id() {
long tmp = 0; long tmp = 0;
tmp = __sync_fetch_and_add(&amf_app_ue_ngap_id_generator, 1); tmp = __sync_fetch_and_add(&amf_app_ue_ngap_id_generator, 1);
//srand(time(NULL)); //srand(time(NULL));
//tmp = rand()%10000 + 1; //tmp = rand()%1000 + 1;
//return tmp & 0xffffffffff; //return tmp & 0xffffffffff;
return tmp; return tmp;
} }
......
...@@ -2170,10 +2170,12 @@ bool amf_n1::authentication_vectors_from_ausf( ...@@ -2170,10 +2170,12 @@ bool amf_n1::authentication_vectors_from_ausf(
authenticationinfo.setServingNetworkName(nc.get()->serving_network); authenticationinfo.setServingNetworkName(nc.get()->serving_network);
ResynchronizationInfo resynchronizationInfo; ResynchronizationInfo resynchronizationInfo;
uint8_t auts_len = blength(nc.get()->auts); uint8_t auts_len = blength(nc.get()->auts);
Logger::amf_n1().debug("auts_len = %d",auts_len);
uint8_t *auts_value = (uint8_t *)bdata(nc.get()->auts); uint8_t *auts_value = (uint8_t *)bdata(nc.get()->auts);
std::string authenticationinfo_auts; std::string authenticationinfo_auts;
std::string authenticationinfo_rand; std::string authenticationinfo_rand;
if (auts_value) { if (auts_len > 0) {
//if (auts_value) {
Logger::amf_n1().debug("********* has auts *********"); Logger::amf_n1().debug("********* has auts *********");
char *auts_s = (char *)malloc(auts_len * 2 + 1); char *auts_s = (char *)malloc(auts_len * 2 + 1);
// char *rand_s = (char *)malloc(RAND_LENGTH * 2 + 1); // char *rand_s = (char *)malloc(RAND_LENGTH * 2 + 1);
......
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