Commit 414af68e authored by Simon Morlat's avatar Simon Morlat
Browse files

allow refresher to refresh Date header.

parent 219760a0
......@@ -260,8 +260,6 @@ static int belle_sip_refresher_refresh_internal(belle_sip_refresher_t* refresher
expires_header = belle_sip_header_expires_new();
belle_sip_message_add_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_HEADER(expires_header));
}
}
belle_sip_provider_add_authorization(prov,request,old_response,auth_infos);
} else {
......@@ -290,6 +288,15 @@ static int belle_sip_refresher_refresh_internal(belle_sip_refresher_t* refresher
if (contact && belle_sip_header_contact_get_expires(contact)>=0)
belle_sip_header_contact_set_expires(contact,refresher->expires);
/*update the Date header if it exists*/
{
belle_sip_header_date_t *date=belle_sip_message_get_header_by_type(request,belle_sip_header_date_t);
if (date){
time_t curtime=time(NULL);
belle_sip_header_date_set_time(date,&curtime);
}
}
client_transaction = belle_sip_provider_create_client_transaction(prov,request);
client_transaction->base.is_internal=1;
belle_sip_transaction_set_application_data(BELLE_SIP_TRANSACTION(client_transaction),refresher);
......
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