fix NULL transport_state
This commit is contained in:
parent
df9f6c6e32
commit
e390489ede
|
@ -2947,21 +2947,22 @@ int ast_sip_session_create_invite(struct ast_sip_session *session, pjsip_tx_data
|
|||
SCOPE_EXIT_RTN_VALUE(-1, "pjsip_inv_invite failed\n");
|
||||
}
|
||||
|
||||
if (transport_state->volte.p_access_network_info[0] &&
|
||||
volte_add_p_access_network_info(*tdata, transport_state->volte.p_access_network_info)) {
|
||||
ast_log(LOG_ERROR, "Failed to add sec agree header.\n");
|
||||
}
|
||||
|
||||
if (volte_add_sec_agree(*tdata)) {
|
||||
ast_log(LOG_ERROR, "Failed to add sec-agree.\n");
|
||||
}
|
||||
|
||||
if (volte_add_security_verify(transport_state, *tdata)) {
|
||||
ast_log(LOG_ERROR, "Failed to add security verify.\n");
|
||||
}
|
||||
if (transport_state) {
|
||||
if (transport_state->volte.p_access_network_info[0] &&
|
||||
volte_add_p_access_network_info(*tdata, transport_state->volte.p_access_network_info)) {
|
||||
ast_log(LOG_ERROR, "Failed to add sec agree header.\n");
|
||||
}
|
||||
|
||||
if (volte_add_security_verify(transport_state, *tdata)) {
|
||||
ast_log(LOG_ERROR, "Failed to add security verify.\n");
|
||||
}
|
||||
|
||||
if (transport_state)
|
||||
ao2_unlock(transport_state);
|
||||
}
|
||||
ao2_cleanup(transport_state);
|
||||
|
||||
SCOPE_EXIT_RTN_VALUE(0);
|
||||
|
|
Loading…
Reference in New Issue