mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
make sure terminated transaction no longer reference op
This commit is contained in:
parent
2ad32695a5
commit
f846e25d68
1 changed files with 5 additions and 2 deletions
|
|
@ -397,7 +397,7 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
|
|||
belle_sip_header_contact_t* remote_contact = belle_sip_message_get_header_by_type(response, belle_sip_header_contact_t);
|
||||
|
||||
if (op->state == SalOpStateTerminated) {
|
||||
belle_sip_message("Op is terminated, nothing to do with this [%i]",response_code);
|
||||
belle_sip_message("Op [%p] is terminated, nothing to do with this [%i]", op, response_code);
|
||||
return;
|
||||
}
|
||||
/*do it all the time, since we can receive provisional responses from a different instance than the final one*/
|
||||
|
|
@ -482,7 +482,10 @@ static void process_transaction_terminated(void *user_ctx, const belle_sip_trans
|
|||
} else {
|
||||
ms_message("Unhandled transaction terminated [%p]",trans);
|
||||
}
|
||||
if (op) sal_op_unref(op); /*because every transaction ref op*/
|
||||
if (op) {
|
||||
sal_op_unref(op); /*because every transaction ref op*/
|
||||
belle_sip_transaction_set_application_data(trans,NULL); /*no longuer reference something we do not ref to avoid futur access of a released op*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue