From 1b291315b43da1148cee5f3821ddbe49b0c86b7f Mon Sep 17 00:00:00 2001 From: Stefan Mititelu Date: Tue, 4 Jul 2023 16:58:53 +0300 Subject: [PATCH] ims_qos: check and log for NULL sessionId --- src/modules/ims_qos/rx_aar.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c index e5e0bddba23..8c0fc4e937d 100644 --- a/src/modules/ims_qos/rx_aar.c +++ b/src/modules/ims_qos/rx_aar.c @@ -152,6 +152,11 @@ void async_aar_callback( cdp_result); counter_inc(ims_qos_cnts_h.successful_media_aars); + if(!aaa->sessionId) { + LM_ERR("async_aar_callback: NULL AAA sessionId from PCRF!\n"); + goto error; + } + LM_DBG("Auth session ID [%.*s]", aaa->sessionId->data.len, aaa->sessionId->data.s); @@ -309,6 +314,12 @@ void async_aar_reg_callback( create_return_code(result); goto done; } + + if(!aaa->sessionId) { + LM_ERR("async_aar_reg_callback: NULL AAA sessionId from PCRF!\n"); + goto error; + } + //need to set Rx auth data to say this session has been successfully opened //This is used elsewhere to prevent acting on termination events when the session has not been opened //getting auth session