X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Flocal%2Fsgnb_mod_conf.h;h=679503c189ac6b9ccc56041101cd058f1d5376eb;hb=1138f77f0f6a7bc9500cf99db5e0ca17b4cb8af6;hp=7a05946af70c6b2b65cf594f0711758721005a00;hpb=31d238a2cba18b87e05a7d9b4820db2c5186c658;p=ric-app%2Fmc.git diff --git a/mc-core/mc/local/sgnb_mod_conf.h b/mc-core/mc/local/sgnb_mod_conf.h index 7a05946..679503c 100644 --- a/mc-core/mc/local/sgnb_mod_conf.h +++ b/mc-core/mc/local/sgnb_mod_conf.h @@ -23,6 +23,9 @@ #include "packet.h" + +#include "/usr/local/include/protobuf-c/protobuf-c.h" + struct _sgnb_mod_conf { gs_uint64_t timestamp_ms; gs_sp_t gnb_id; @@ -39,10 +42,13 @@ static inline gs_retval_t get_sgnb_mod_conf__timestamp_ms(struct packet *p, gs_u } static inline gs_retval_t get_sgnb_mod_conf__gnb_id(struct packet *p, struct gs_string *t){ -t->data = ((struct _sgnb_mod_conf *)(p->record.packed.values))->gnb_id; - t->length = strlen(t->data); t->owner=0; - return 0; + t->data = ((struct _sgnb_mod_conf *)(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_mod_conf__id_MeNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){