Ignore:
Timestamp:
Jun 23, 2010 12:21:20 PM (14 years ago)
Author:
bennylp
Message:

Another unterminated SDP offer/answer negotiation fix (Re: #1045):

  • fixed unterminated negotiation if our media transport rejects incoming offer (e.g. due to mismatch SRTP transport) with 488.
  • to fix the above, modified the SDP negotiator (sdp_neg.[hc])'s pjmedia_sdp_neg_cancel_offer() to also be able to cancel in remote offer state
  • also fixed the bug introduced previous Session Timer fix (Re: #1047), which cause SDP negotiator's state to be cleared after failed UAC UPDATE transaction is terminated, which means UPDATE can only be sent 5 seconds after the last UPDATE if the last UPDATE failed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r3215 r3217  
    27902790            (status=inv_negotiate_sdp(inv)) != PJ_SUCCESS) 
    27912791        { 
    2792             /* Negotiation has failed */ 
     2792            /* Negotiation has failed. If negotiator is still 
     2793             * stuck at non-DONE state, cancel any ongoing offer. 
     2794             */ 
     2795            neg_state = pjmedia_sdp_neg_get_state(inv->neg); 
     2796            if (neg_state != PJMEDIA_SDP_NEG_STATE_DONE) { 
     2797                pjmedia_sdp_neg_cancel_offer(inv->neg); 
     2798            } 
     2799 
    27932800            status = pjsip_dlg_create_response(inv->dlg, rdata,  
    27942801                                               PJSIP_SC_NOT_ACCEPTABLE_HERE, 
     
    29022909    } 
    29032910 
    2904     /* Otherwise if we don't get successful response, cancel 
    2905      * our negotiator. 
    2906      */ 
    2907     if (status != PJ_SUCCESS && 
    2908         pjmedia_sdp_neg_get_state(inv->neg)==PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER && 
     2911    /* Cancel the negotiation if we don't get successful negotiation by now */ 
     2912    if (pjmedia_sdp_neg_get_state(inv->neg) == 
     2913                PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER && 
    29092914        tsx_inv_data && tsx_inv_data->sdp_done == PJ_FALSE)  
    29102915    { 
Note: See TracChangeset for help on using the changeset viewer.