X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Flocal%2Fsgnb_mod_required.h;h=e45a076f8e0585bfec99ff8679f7d85b838404fc;hb=0d6fd96d78e807e9996737403d331b0a219592c1;hp=4d9ce0e15f96637c659860cdc5060e2f77d6c5a0;hpb=31d238a2cba18b87e05a7d9b4820db2c5186c658;p=ric-app%2Fmc.git diff --git a/mc-core/mc/local/sgnb_mod_required.h b/mc-core/mc/local/sgnb_mod_required.h index 4d9ce0e..e45a076 100644 --- a/mc-core/mc/local/sgnb_mod_required.h +++ b/mc-core/mc/local/sgnb_mod_required.h @@ -23,6 +23,9 @@ #include "packet.h" + +#include "/usr/local/include/protobuf-c/protobuf-c.h" + struct _sgnb_mod_required { gs_uint64_t timestamp_ms; gs_sp_t gnb_id; @@ -43,10 +46,13 @@ static inline gs_retval_t get_sgnb_mod_required__timestamp_ms(struct packet *p, } static inline gs_retval_t get_sgnb_mod_required__gnb_id(struct packet *p, struct gs_string *t){ -t->data = ((struct _sgnb_mod_required *)(p->record.packed.values))->gnb_id; - t->length = strlen(t->data); t->owner=0; - return 0; + t->data = ((struct _sgnb_mod_required *)(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_required__cause_protocol(struct packet *p, gs_int64_t *t){