mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
improve custom header so that they work with responses too
This commit is contained in:
parent
8cd22d9063
commit
aae5ae888c
4 changed files with 8 additions and 2 deletions
|
|
@ -233,6 +233,8 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
|
|||
if (!op->base.call_id) {
|
||||
op->base.call_id=ms_strdup(belle_sip_header_call_id_get_call_id(BELLE_SIP_HEADER_CALL_ID(belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(response), belle_sip_header_call_id_t))));
|
||||
}
|
||||
sal_op_assign_recv_headers(op,(belle_sip_message_t*)response);
|
||||
|
||||
if (op->callbacks.process_response_event) {
|
||||
|
||||
if (op->base.root->nat_helper_enabled) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ SalOp * sal_op_new(Sal *sal){
|
|||
sal_op_ref(op);
|
||||
return op;
|
||||
}
|
||||
|
||||
void sal_op_release(SalOp *op){
|
||||
op->state=SalOpStateTerminated;
|
||||
sal_op_set_user_pointer(op,NULL);/*mandatory because releasing op doesn not mean freeing op. Make sure back pointer will not be used later*/
|
||||
|
|
@ -35,6 +36,7 @@ void sal_op_release(SalOp *op){
|
|||
}
|
||||
sal_op_unref(op);
|
||||
}
|
||||
|
||||
void sal_op_release_impl(SalOp *op){
|
||||
ms_message("Destroying op [%p] of type [%s]",op,sal_op_type_to_string(op->type));
|
||||
if (op->pending_auth_transaction) belle_sip_object_unref(op->pending_auth_transaction);
|
||||
|
|
|
|||
|
|
@ -827,9 +827,9 @@ const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call){
|
|||
cp->low_bandwidth=TRUE;
|
||||
}
|
||||
}
|
||||
cp->custom_headers=(SalCustomHeader*)sal_op_get_recv_custom_header(call->op);
|
||||
return cp;
|
||||
}
|
||||
cp->custom_headers=(SalCustomHeader*)sal_op_get_recv_custom_header(call->op);
|
||||
return cp;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -466,6 +466,8 @@ static void call_with_custom_headers(void) {
|
|||
CU_ASSERT_PTR_NOT_NULL(hvalue);
|
||||
CU_ASSERT_TRUE(strcmp(hvalue,"bad")==0);
|
||||
|
||||
CU_ASSERT_PTR_NOT_NULL(linphone_call_get_remote_contact(c1));
|
||||
|
||||
/*just to sleep*/
|
||||
linphone_core_terminate_all_calls(pauline->lc);
|
||||
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue