msc logs, remove inlines or error code functions
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7368 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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_ */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user