Move RETURN_IF_INVALID_ASSOC_ID() to header for use elsewhere
RETURN_IF_INVALID_ASSOC_ID() checks if an assoc_id (of a DU) is valid. It will be also used in the mobility RRC module later. Move it to the DU header (where it logically belongs) to move it from there.
This commit is contained in:
@@ -112,16 +112,6 @@ extern RAN_CONTEXT_t RC;
|
||||
|
||||
mui_t rrc_gNB_mui = 0;
|
||||
|
||||
// the assoc_id might be 0 (if the DU goes offline). Below helper macro to
|
||||
// print an error and return from the function in that case
|
||||
#define RETURN_IF_INVALID_ASSOC_ID(assoc_id) \
|
||||
{ \
|
||||
if (assoc_id == 0) { \
|
||||
LOG_E(NR_RRC, "cannot send data: invalid assoc_id 0, DU offline\n"); \
|
||||
return; \
|
||||
} \
|
||||
}
|
||||
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
|
||||
|
||||
@@ -48,4 +48,14 @@ int get_dl_band(const struct f1ap_served_cell_info_t *cell_info);
|
||||
int get_ssb_scs(const struct f1ap_served_cell_info_t *cell_info);
|
||||
int get_ssb_arfcn(const struct nr_rrc_du_container_t *du);
|
||||
|
||||
// the assoc_id might be 0 (if the DU goes offline). Below helper macro to
|
||||
// print an error and return from the function in that case
|
||||
#define RETURN_IF_INVALID_ASSOC_ID(assoc_id) \
|
||||
{ \
|
||||
if (assoc_id == 0) { \
|
||||
LOG_E(NR_RRC, "cannot send data: invalid assoc_id 0, DU offline\n"); \
|
||||
return; \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif /* RRC_GNB_DU_H_ */
|
||||
|
||||
Reference in New Issue
Block a user