remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag

This commit is contained in:
Laurent THOMAS
2025-08-20 09:36:48 +02:00
committed by Robert Schmidt
parent 2dae7b0db4
commit 4a3ebb3033
25 changed files with 19 additions and 91 deletions
+3 -3
View File
@@ -47,7 +47,7 @@ ssize_t x2ap_generate_initiating_message(
pdu.choice.initiatingMessage.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.initiatingMessage.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
@@ -79,7 +79,7 @@ ssize_t x2ap_generate_successfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
@@ -111,7 +111,7 @@ ssize_t x2ap_generate_unsuccessfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
-2
View File
@@ -49,8 +49,6 @@
# define X2AP_PORT 36422
#endif
extern int asn1_xer_print;
#include "common/utils/LOG/log.h"
#define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
#define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
+1 -1
View File
@@ -156,7 +156,7 @@ int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint3
length,
0,
0);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, pdu);
}
+1 -1
View File
@@ -44,7 +44,7 @@ int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)pdu);
}