Telnet: improve fetch_du_by_ue_id to auto-detect connected UE

Issue: sometimes it happens that an ul failure occurs in the handover
pipeline, UE reconnects with different UE ID and fetch_du_by_ue_id fails.

- Modified fetch_du_by_ue_id in telnetsrv_ci.c to automatically find
  the connected UE when no UE ID is provided, similar to other
  telnet commands like rrc_gNB_trigger_f1_ho
- Updated test cases in container_sa_f1_ho_b210_quectel.xml to use
  the improved command without hardcoded UE ID parameter
- This makes the command more robust and easier to use in CI tests
This commit is contained in:
Guido Casati
2026-01-29 10:17:42 +01:00
parent aff0ea5760
commit 129b62e708
5 changed files with 19 additions and 12 deletions
+8 -1
View File
@@ -154,10 +154,17 @@ int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt)
if (!RC.nrrrc)
ERROR_MSG_RET("no RRC present, cannot list counts\n");
ue_id_t ue_id = 1;
ue_id_t ue_id;
if (buf) {
ue_id = strtol(buf, NULL, 10);
} else {
// No UE ID provided: find the connected UE first
rrc_gNB_ue_context_t *ue = get_single_rrc_ue();
if (!ue)
ERROR_MSG_RET("no single UE in RRC present\n");
ue_id = ue->ue_context.rrc_ue_id;
}
nr_rrc_du_container_t *du = get_du_for_ue(RC.nrrrc[0], ue_id);
if (du) {