Commit 59bf54c9 authored by Guido Casati's avatar Guido Casati Committed by Robert Schmidt

Make a separate function to fetch RNTI in telnet CI

parent fb1f2539
...@@ -115,10 +115,8 @@ int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt) ...@@ -115,10 +115,8 @@ int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt)
return 0; return 0;
} }
int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) int fetch_rnti(char *buf, telnet_printfunc_t prnt)
{ {
if (!RC.nrmac)
ERROR_MSG_RET("no MAC/RLC present, cannot trigger reestablishment\n");
int rnti = -1; int rnti = -1;
if (!buf) { if (!buf) {
rnti = get_single_ue_rnti_mac(); rnti = get_single_ue_rnti_mac();
...@@ -129,9 +127,15 @@ int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) ...@@ -129,9 +127,15 @@ int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt)
if (rnti < 1 || rnti >= 0xfffe) if (rnti < 1 || rnti >= 0xfffe)
ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n"); ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n");
} }
return rnti;
}
int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt)
{
if (!RC.nrmac)
ERROR_MSG_RET("no MAC/RLC present, cannot trigger reestablishment\n");
int rnti = fetch_rnti(buf, prnt);
nr_rlc_test_trigger_reestablishment(rnti); nr_rlc_test_trigger_reestablishment(rnti);
prnt("Reset RLC counters of UE RNTI %04x to trigger reestablishment\n", rnti); prnt("Reset RLC counters of UE RNTI %04x to trigger reestablishment\n", rnti);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment