From 1a5cb8a6e2b828eeb0650ef1d73f87c356742b21 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 26 Apr 2023 15:02:12 +0200 Subject: [PATCH] UE NAS: Add timeout before shutting down UE to RLC Ack the PDU --- openair3/NAS/NR_UE/nr_nas_msg_sim.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index e57e3800de..b7cc6de789 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -1003,6 +1003,11 @@ void *nas_nrue_task(void *args_p) case NAS_CONN_RELEASE_IND: LOG_I(NAS, "[UE %ld] Received %s: cause %u\n", instance, ITTI_MSG_NAME (msg_p), NAS_CONN_RELEASE_IND (msg_p).cause); + /* the following is not clean, but probably necessary: we need to give + * time to RLC to Ack the SRB1 PDU which contained the RRC release + * message. Hence, we just below wait some time, before finally + * unblocking the nr-uesoftmodem, which will terminate the process. */ + usleep(100000); itti_wait_tasks_unblock(); /* will unblock ITTI to stop nr-uesoftmodem */ break;