Skip to content

Commit

Permalink
ims_qos: check and log for NULL sessionId
Browse files Browse the repository at this point in the history
(cherry picked from commit 1b29131)
  • Loading branch information
smititelu committed Jul 5, 2023
1 parent 7630473 commit 4413006
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/ims_qos/rx_aar.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
LM_DBG("Success, received code: [%i] from PCRF for AAR request\n", cdp_result);
counter_inc(ims_qos_cnts_h.successful_media_aars);

if(!aaa->sessionId) {
LM_ERR("NULL AAA sessionId from PCRF!\n");
goto error;
}

LM_DBG("Auth session ID [%.*s]", aaa->sessionId->data.len, aaa->sessionId->data.s);

if(!data->aar_update) {
Expand Down Expand Up @@ -286,6 +291,12 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e
create_return_code(result);
goto done;
}

if(!aaa->sessionId) {
LM_ERR("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
Expand Down

0 comments on commit 4413006

Please sign in to comment.