X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Flocal%2Fsgnb_mod_req.h;h=bd4ae33da0062cbac32e8265c3dc4c1cb1832547;hb=refs%2Fchanges%2F57%2F3557%2F3;hp=45a2debc9a596b6931813fa72efcaa8337ede7db;hpb=31d238a2cba18b87e05a7d9b4820db2c5186c658;p=ric-app%2Fmc.git diff --git a/mc-core/mc/local/sgnb_mod_req.h b/mc-core/mc/local/sgnb_mod_req.h index 45a2deb..bd4ae33 100644 --- a/mc-core/mc/local/sgnb_mod_req.h +++ b/mc-core/mc/local/sgnb_mod_req.h @@ -23,6 +23,9 @@ #include "packet.h" + +#include "/usr/local/include/protobuf-c/protobuf-c.h" + struct _sgnb_mod_req { gs_uint64_t timestamp_ms; gs_sp_t gnb_id; @@ -44,10 +47,13 @@ static inline gs_retval_t get_sgnb_mod_req__timestamp_ms(struct packet *p, gs_ui } static inline gs_retval_t get_sgnb_mod_req__gnb_id(struct packet *p, struct gs_string *t){ -t->data = ((struct _sgnb_mod_req *)(p->record.packed.values))->gnb_id; - t->length = strlen(t->data); t->owner=0; - return 0; + t->data = ((struct _sgnb_mod_req *)(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_req__cause_protocol(struct packet *p, gs_int64_t *t){