X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fxapp-asn%2Fe2ap%2Fe2ap_indication.hpp;fp=src%2Fxapp-asn%2Fe2ap%2Fe2ap_indication.hpp;h=a3e2ede6e6d4d81c2e7121d257919b0b7b1d7521;hb=858eb3785ad300196cf677143a6759f857344702;hp=48051db28b3be0a6a5bc8ab079a2c36dbe562f4f;hpb=4edb52e022fe23b8951488c959458ad68b644d47;p=ric-app%2Fhw.git diff --git a/src/xapp-asn/e2ap/e2ap_indication.hpp b/src/xapp-asn/e2ap/e2ap_indication.hpp index 48051db..a3e2ede 100644 --- a/src/xapp-asn/e2ap/e2ap_indication.hpp +++ b/src/xapp-asn/e2ap/e2ap_indication.hpp @@ -225,6 +225,7 @@ E2APIndication::~E2APIndication(void){ } free(IE_array); + free(initMsg); ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); mdclog_write(MDCLOG_DEBUG, "Freed E2AP Indication object memory"); } @@ -241,8 +242,6 @@ bool E2APIndication::decode(unsigned char *buf, size_t *size) mdclog_write(MDCLOG_INFO, "Successfully decoded: %s","RIC Indication Message"); } - xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - initMsg = e2ap_pdu_obj->choice.initiatingMessage; //write the decoding code. if (initMsg == 0){ @@ -292,6 +291,7 @@ bool E2APIndication::decode(unsigned char *buf, size_t *size) } } + // xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); return true; @@ -319,8 +319,6 @@ bool E2APIndication::encode(unsigned char *buf, size_t *size){ return false; } - xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); if(retval.encoded == -1){ _error_string.assign(strerror(errno)); @@ -337,6 +335,8 @@ bool E2APIndication::encode(unsigned char *buf, size_t *size){ } *size = retval.encoded; + xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); + return true; }