diff --git a/openair-cn/S6A/s6a_auth_info.c b/openair-cn/S6A/s6a_auth_info.c index 1fbeba88561794c8c5d140b62ded2be1d183e69a..499eacb4ee37b80d90fb9a329b6f16ce116cb87e 100644 --- a/openair-cn/S6A/s6a_auth_info.c +++ b/openair-cn/S6A/s6a_auth_info.c @@ -234,6 +234,14 @@ int s6a_aia_cb(struct msg **msg, struct avp *paramavp, s6a_auth_info_ans_p->result.present = S6A_RESULT_BASE; s6a_auth_info_ans_p->result.choice.base = hdr->avp_value->u32; + MSC_LOG_TX_MESSAGE( + MSC_S6A_MME, + MSC_MMEAPP_MME, + NULL,0, + "0 S6A_AUTH_INFO_ANS imsi %s %s", + s6a_auth_info_ans_p->imsi, + retcode_2_string(s6a_auth_info_ans_p->result.choice.base)); + if (hdr->avp_value->u32 != ER_DIAMETER_SUCCESS) { S6A_ERROR("Got error %u:%s\n", hdr->avp_value->u32, retcode_2_string(hdr->avp_value->u32)); @@ -257,11 +265,26 @@ int s6a_aia_cb(struct msg **msg, struct avp *paramavp, s6a_auth_info_ans_p->result.present = S6A_RESULT_EXPERIMENTAL; s6a_parse_experimental_result(avp, &s6a_auth_info_ans_p->result.choice.experimental); + MSC_LOG_TX_MESSAGE( + MSC_S6A_MME, + MSC_MMEAPP_MME, + NULL,0, + "0 S6A_AUTH_INFO_ANS imsi %s %s", + s6a_auth_info_ans_p->imsi, + experimental_retcode_2_string(s6a_auth_info_ans_p->result.choice.experimental)); + skip_auth_res = 1; } else { /* Neither result-code nor experimental-result is present -> * totally incorrect behaviour here. */ + MSC_LOG_TX_MESSAGE_FAILED( + MSC_S6A_MME, + MSC_MMEAPP_MME, + NULL,0, + "0 S6A_AUTH_INFO_ANS imsi %s", + s6a_auth_info_ans_p->imsi); + S6A_ERROR("Experimental-Result and Result-Code are absent: " "This is not a correct behaviour\n"); goto err; @@ -277,12 +300,6 @@ int s6a_aia_cb(struct msg **msg, struct avp *paramavp, DevMessage("We requested E-UTRAN vectors with an immediate response...\n"); } } - MSC_LOG_TX_MESSAGE( - MSC_S6A_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S6A_AUTH_INFO_ANS imsi %s", - s6a_auth_info_ans_p->imsi); itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); err: return 0; diff --git a/openair-cn/S6A/s6a_defs.h b/openair-cn/S6A/s6a_defs.h index 03ee45a0579706bd4bef0dd3efe49f758fa7f8fe..c1a138b23ec2a40474d6b9ba3392c46afcb20739 100644 --- a/openair-cn/S6A/s6a_defs.h +++ b/openair-cn/S6A/s6a_defs.h @@ -196,60 +196,8 @@ int s6a_parse_subscription_data(struct avp *avp_subscription_data, subscription_data_t *subscription_data); int s6a_parse_experimental_result(struct avp *avp, s6a_experimental_result_t *ptr); -#ifndef CMAKER -inline char *experimental_retcode_2_string(uint32_t ret_code); -inline char *retcode_2_string(uint32_t ret_code); -#else -inline char *experimental_retcode_2_string(uint32_t ret_code) -{ - switch(ret_code) { - /* Experimental-Result-Codes */ - case DIAMETER_ERROR_USER_UNKNOWN: - return "DIAMETER_ERROR_USER_UNKNOWN"; +char *experimental_retcode_2_string(uint32_t ret_code); +char *retcode_2_string(uint32_t ret_code); - case DIAMETER_ERROR_ROAMING_NOT_ALLOWED: - return "DIAMETER_ERROR_ROAMING_NOT_ALLOWED"; - - case DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION: - return "DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION"; - - case DIAMETER_ERROR_RAT_NOT_ALLOWED: - return "DIAMETER_ERROR_RAT_NOT_ALLOWED"; - - case DIAMETER_ERROR_EQUIPMENT_UNKNOWN: - return "DIAMETER_ERROR_EQUIPMENT_UNKNOWN"; - - case DIAMETER_ERROR_UNKOWN_SERVING_NODE: - return "DIAMETER_ERROR_UNKOWN_SERVING_NODE"; - - case DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE: - return "DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} - -inline char *retcode_2_string(uint32_t ret_code) -{ - switch(ret_code) { - case ER_DIAMETER_SUCCESS: - return "DIAMETER_SUCCESS"; - - case ER_DIAMETER_MISSING_AVP: - return "DIAMETER_MISSING_AVP"; - - case ER_DIAMETER_INVALID_AVP_VALUE: - return "DIAMETER_INVALID_AVP_VALUE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} -#endif #endif /* S6A_DEFS_H_ */ diff --git a/openair-cn/S6A/s6a_error.c b/openair-cn/S6A/s6a_error.c index 1812892c29f88d4ce889ec1acefb0be34383917d..28bf5dd4e2bb167c162e3e321dfdf695c7d7c1cd 100644 --- a/openair-cn/S6A/s6a_error.c +++ b/openair-cn/S6A/s6a_error.c @@ -77,8 +77,7 @@ int s6a_parse_experimental_result(struct avp *avp, s6a_experimental_result_t *pt return 0; } -#ifndef CMAKER -inline char *experimental_retcode_2_string(uint32_t ret_code) +char *experimental_retcode_2_string(uint32_t ret_code) { switch(ret_code) { /* Experimental-Result-Codes */ @@ -110,7 +109,7 @@ inline char *experimental_retcode_2_string(uint32_t ret_code) return "DIAMETER_AVP_UNSUPPORTED"; } -inline char *retcode_2_string(uint32_t ret_code) +char *retcode_2_string(uint32_t ret_code) { switch(ret_code) { case ER_DIAMETER_SUCCESS: @@ -128,4 +127,3 @@ inline char *retcode_2_string(uint32_t ret_code) return "DIAMETER_AVP_UNSUPPORTED"; } -#endif diff --git a/openair-cn/S6A/s6a_task.c b/openair-cn/S6A/s6a_task.c index 9849b6caba32e0443638735bb3a5962572fcaa33..26bbff899c4980bd92e449079b64fe0450404217 100644 --- a/openair-cn/S6A/s6a_task.c +++ b/openair-cn/S6A/s6a_task.c @@ -140,9 +140,9 @@ int s6a_init(const mme_config_t *mme_config_p) /* Set gnutls debug level ? */ if (gnutls_debug) { - gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); - gnutls_global_set_log_level (gnutls_debug); - S6A_DEBUG("Enabled GNUTLS debug at level %d", gnutls_debug); + //gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); + //gnutls_global_set_log_level (gnutls_debug); + //S6A_DEBUG("Enabled GNUTLS debug at level %d", gnutls_debug); } /* Starting freeDiameter core */ diff --git a/openair-cn/S6A/s6a_up_loc.c b/openair-cn/S6A/s6a_up_loc.c index 2d57d1bc900cd4c1e58f290a2a43821fb81d4ba9..d1d2931d70d0cb6db80844735e740d0d5fcf652c 100644 --- a/openair-cn/S6A/s6a_up_loc.c +++ b/openair-cn/S6A/s6a_up_loc.c @@ -38,6 +38,7 @@ #include "intertask_interface.h" #include "s6a_defs.h" #include "s6a_messages.h" +#include "msc.h" int s6a_ula_cb( @@ -89,6 +90,14 @@ int s6a_ula_cb( s6a_update_location_ans_p->result.present = S6A_RESULT_BASE; s6a_update_location_ans_p->result.choice.base = hdr_p->avp_value->u32; + MSC_LOG_TX_MESSAGE( + MSC_S6A_MME, + MSC_MMEAPP_MME, + NULL,0, + "0 S6A_UPDATE_LOCATION_ANS imsi %SCNu64 %s", + s6a_update_location_ans_p->imsi, + retcode_2_string(hdr_p->avp_value->u32)); + if (hdr_p->avp_value->u32 != ER_DIAMETER_SUCCESS) { S6A_ERROR("Got error %u:%s\n", hdr_p->avp_value->u32, retcode_2_string(hdr_p->avp_value->u32));