Add utility functions related to STOP.indication
This commit is contained in:
committed by
Rúben Soares Silva
parent
9623f49a2e
commit
97afd62522
@@ -390,6 +390,13 @@ bool eq_stop_request(const nfapi_nr_stop_request_scf_t *unpacked_req, const nfap
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eq_stop_indication(const nfapi_nr_stop_indication_scf_t *unpacked_req, const nfapi_nr_stop_indication_scf_t *req)
|
||||
{
|
||||
EQ(unpacked_req->header.message_id, req->header.message_id);
|
||||
EQ(unpacked_req->header.message_length, req->header.message_length);
|
||||
return true;
|
||||
}
|
||||
|
||||
void free_param_request(nfapi_nr_param_request_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
@@ -480,6 +487,13 @@ void free_stop_request(nfapi_nr_stop_request_scf_t *msg)
|
||||
}
|
||||
}
|
||||
|
||||
void free_stop_indication(nfapi_nr_stop_indication_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
}
|
||||
|
||||
void copy_param_request(const nfapi_nr_param_request_scf_t *src, nfapi_nr_param_request_scf_t *dst)
|
||||
{
|
||||
dst->header.message_id = src->header.message_id;
|
||||
@@ -908,3 +922,15 @@ void copy_stop_request(const nfapi_nr_stop_request_scf_t *src, nfapi_nr_stop_req
|
||||
copy_vendor_extension_value(&dst->vendor_extension, &src->vendor_extension);
|
||||
}
|
||||
}
|
||||
|
||||
void copy_stop_indication(const nfapi_nr_stop_indication_scf_t *src, nfapi_nr_stop_indication_scf_t *dst)
|
||||
{
|
||||
dst->header.message_id = src->header.message_id;
|
||||
dst->header.message_length = src->header.message_length;
|
||||
if (src->vendor_extension) {
|
||||
dst->vendor_extension = calloc(1, sizeof(nfapi_vendor_extension_tlv_t));
|
||||
dst->vendor_extension->tag = src->vendor_extension->tag;
|
||||
dst->vendor_extension->length = src->vendor_extension->length;
|
||||
copy_vendor_extension_value(&dst->vendor_extension, &src->vendor_extension);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user