Avoid assert on non-implemented SM write callback
The asserts might be used to intentionally stop the running process. Further, it might be an annoyance if it happen unintentionally. Just print an error message instead, and return to FlexRIC that nothing is to be sent.
This commit is contained in:
@@ -93,5 +93,7 @@ void read_gtp_setup_sm(void* data)
|
||||
sm_ag_if_ans_t write_ctrl_gtp_sm(void const* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(0 !=0 && "Not supported");
|
||||
printf("write_ctrl callback for GTP SM: operation not supported\n");
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,8 @@ void read_mac_setup_sm(void* data)
|
||||
sm_ag_if_ans_t write_ctrl_mac_sm(void const* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(0 !=0 && "Not supported");
|
||||
printf("write_ctrl callback for MAC SM: operation not supported\n");
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ sm_ag_if_ans_t write_ctrl_pdcp_sm(void const* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
// assert(data->type == PDCP_CTRL_REQ_V0 );
|
||||
assert(0 !=0 && "Not supported");
|
||||
printf("write_ctrl callback for PDCP SM: operation not supported\n");
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,8 @@ void read_rlc_setup_sm(void* data)
|
||||
sm_ag_if_ans_t write_ctrl_rlc_sm(void const* data)
|
||||
{
|
||||
(void)data;
|
||||
assert(0!=0 && "Not supported");
|
||||
printf("write_ctrl callback for RLC SM: operation not supported\n");
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ void read_kpm_setup_sm(void* e2ap)
|
||||
|
||||
sm_ag_if_ans_t write_ctrl_kpm_sm(void const* src)
|
||||
{
|
||||
assert(0 !=0 && "Not supported");
|
||||
printf("write_ctrl callback for KPM SM: operation not supported\n");
|
||||
(void)src;
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
|
||||
Reference in New Issue
Block a user