remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag
This commit is contained in:
committed by
Robert Schmidt
parent
2dae7b0db4
commit
4a3ebb3033
@@ -31,8 +31,6 @@
|
||||
#include "conversions.h"
|
||||
#include "ngap_common.h"
|
||||
|
||||
int asn1_xer_print = 0;
|
||||
|
||||
void encode_ngap_cause(NGAP_Cause_t *out, const ngap_cause_t *in)
|
||||
{
|
||||
switch (in->type) {
|
||||
|
||||
@@ -48,9 +48,6 @@
|
||||
|
||||
#define NGAP_UE_ID_FMT "0x%06"PRIX32
|
||||
|
||||
extern int asn_debug;
|
||||
extern int asn1_xer_print;
|
||||
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "ngap_gNB_default_values.h"
|
||||
# define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args)
|
||||
|
||||
@@ -115,7 +115,7 @@ int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
|
||||
DevAssert(pdu != NULL);
|
||||
DevAssert(buffer != NULL);
|
||||
DevAssert(len != NULL);
|
||||
if (asn1_xer_print) {
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu);
|
||||
}
|
||||
switch (pdu->present) {
|
||||
|
||||
@@ -690,7 +690,7 @@ int ngap_gNB_initial_ctxt_resp(instance_t instance, ngap_initial_context_setup_r
|
||||
// ie->value.choice.CriticalityDiagnostics =;
|
||||
}
|
||||
|
||||
if (asn1_xer_print) {
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu);
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ int ngap_gNB_initial_ctxt_fail(instance_t instance, ngap_initial_context_setup_f
|
||||
ie->value.present = NGAP_InitialContextSetupFailureIEs__value_PR_Cause;
|
||||
encode_ngap_cause(&ie->value.choice.Cause, &initial_ctxt_fail->cause);
|
||||
}
|
||||
if (asn1_xer_print) {
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu);
|
||||
}
|
||||
if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user