Commit 0663cf17 authored by jehan's avatar jehan
Browse files

update dialog remote cseq

parent 27929b47
......@@ -315,6 +315,15 @@ static void belle_sip_dialog_stop_200Ok_retrans(belle_sip_dialog_t *obj){
int belle_sip_dialog_update(belle_sip_dialog_t *obj,belle_sip_request_t *req, belle_sip_response_t *resp, int as_uas){
int code;
/*first update local/remote cseq*/
if (as_uas) {
belle_sip_header_cseq_t* cseq=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_cseq_t);
if (belle_sip_header_cseq_get_seq_number(cseq)<=obj->remote_cseq) {
belle_sip_error("Non monotonic cseq [%i] previous was [%i]",belle_sip_header_cseq_get_seq_number(cseq),obj->remote_cseq);
}
obj->remote_cseq=belle_sip_header_cseq_get_seq_number(cseq);
}
switch (obj->state){
case BELLE_SIP_DIALOG_NULL:
case BELLE_SIP_DIALOG_EARLY:
......
......@@ -95,9 +95,10 @@ static void belle_sip_provider_dispatch_request(belle_sip_provider_t* prov, bell
/*Search for a dialog if exist */
ev.dialog=belle_sip_provider_find_dialog(prov,req,1/*request=uas*/);
if (strcmp("ACK",belle_sip_request_get_method(req))==0 && ev.dialog){
if (strcmp("ACK",belle_sip_request_get_method(req))==0){
if (!ev.dialog) {
belle_sip_warning("Provider [%p] received an unexpected stateless ACK",prov);
if (belle_sip_dialog_handle_ack(ev.dialog,req)==-1){
} else if (belle_sip_dialog_handle_ack(ev.dialog,req)==-1){
/*absorbed ACK retransmission, ignore */
return;
}
......
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