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

better handle 491 request pending in refreshed SUBSCRIBEs

parent 18fb1127
......@@ -576,7 +576,10 @@ int belle_sip_dialog_update(belle_sip_dialog_t *obj, belle_sip_transaction_t* tr
}else if (!as_uas){
if (code >= 300 || (code==0 && belle_sip_transaction_get_state(transaction)==BELLE_SIP_TRANSACTION_TERMINATED)){
/*case of a SUBSCRIBE refresh that is rejected or unanswered*/
delete_dialog = TRUE;
if (code != 491){
/*request pending is not fatal for the dialog*/
delete_dialog = TRUE;
}
}
}
}else if (is_notify){
......
......@@ -330,7 +330,8 @@ static void process_response_event(belle_sip_listener_t *user_ctx, const belle_s
}
case 491: {
if (refresher->target_expires>0) {
retry_later_on_io_error(refresher);
int delay = belle_sip_random() % 10000; /*schedule a retry between 0 and 10 seconds*/
schedule_timer_at(refresher, delay, RETRY);
return; /*do not notify this kind of error*/
}
}
......
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