Commit 712a5fb0 authored by Simon Morlat's avatar Simon Morlat
Browse files

add automatic support of min-expires in refresher

parent 6418fb87
......@@ -142,7 +142,21 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
break; /*Notify user of registration failure*/
else
return; /*ok, keep 401 internal*/
}
case 423:{
belle_sip_header_extension_t *min_expires=BELLE_SIP_HEADER_EXTENSION(belle_sip_message_get_header((belle_sip_message_t*)response,"Min-Expires"));
if (min_expires){
const char *value=belle_sip_header_extension_get_value(min_expires);
if (value){
int new_expires=atoi(value);
if (new_expires>0){
refresher->expires=new_expires;
belle_sip_refresher_refresh(refresher,refresher->expires);
return;
}
}
}else belle_sip_warning("Receiving 423 but no min-expires header.");
break;
}
case 408:
case 480:
......
......@@ -25,7 +25,6 @@ static void belle_sip_tls_listening_point_uninit(belle_sip_tls_listening_point_t
}
static belle_sip_channel_t *tls_create_channel(belle_sip_listening_point_t *lp, const belle_sip_hop_t *hop){
belle_sip_channel_t *chan=belle_sip_channel_new_tls(BELLE_SIP_TLS_LISTENING_POINT(lp)
,belle_sip_uri_get_host(lp->listening_uri)
,belle_sip_uri_get_port(lp->listening_uri)
......
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