X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Flocal%2FSgNB_ack_for_add_mod_for_ue.h;h=3e0bf80d2e95a044843c4ac1db62ec6e6eb116a7;hb=167fe26eb2c6d3fca6bd0cf93e59ef6309a59585;hp=d4e2b6fa07ff468ba21a8af2c8ae6acfe58fc06d;hpb=31d238a2cba18b87e05a7d9b4820db2c5186c658;p=ric-app%2Fmc.git diff --git a/mc-core/mc/local/SgNB_ack_for_add_mod_for_ue.h b/mc-core/mc/local/SgNB_ack_for_add_mod_for_ue.h index d4e2b6f..3e0bf80 100644 --- a/mc-core/mc/local/SgNB_ack_for_add_mod_for_ue.h +++ b/mc-core/mc/local/SgNB_ack_for_add_mod_for_ue.h @@ -23,6 +23,9 @@ #include "packet.h" + +#include "/usr/local/include/protobuf-c/protobuf-c.h" + struct _SgNB_ack_for_add_mod_for_ue { gs_uint64_t timestamp_ms; gs_sp_t gnb_id; @@ -60,10 +63,13 @@ static inline gs_retval_t get_SgNB_ack_for_add_mod_for_ue__timestamp_ms(struct p } static inline gs_retval_t get_SgNB_ack_for_add_mod_for_ue__gnb_id(struct packet *p, struct gs_string *t){ -t->data = ((struct _SgNB_ack_for_add_mod_for_ue *)(p->record.packed.values))->gnb_id; - t->length = strlen(t->data); t->owner=0; - return 0; + t->data = ((struct _SgNB_ack_for_add_mod_for_ue *)(p->record.packed.values))->gnb_id; + if( t->data == NULL){ + t->length=0; + return 0; + } + t->length = strlen(t->data); } static inline gs_retval_t get_SgNB_ack_for_add_mod_for_ue__id_MeNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){