Commit aae5ae88 authored by Simon Morlat's avatar Simon Morlat
Browse files

improve custom header so that they work with responses too

parent 8cd22d90
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment