Ticket #817: pjsip-2553-sip_inv-cancel_sdp_neg_on_sending_negative_reply_to_reinvite.patch

File pjsip-2553-sip_inv-cancel_sdp_neg_on_sending_negative_reply_to_reinvite.patch, 584 bytes (added by bennylp, 15 years ago)

Patch from Ruud Klaver to cancel negotiator state when we're sending negative response to re-INVITE

  • pjsip/src/pjsip-ua/sip_inv.c

     
    17091709        } 
    17101710    } 
    17111711 
     1712    /* Cancel SDP negotiation if this is a negative reply to a re-INVITE */ 
     1713    if (st_code >= 300 && inv->neg != NULL && 
     1714            inv->state == PJSIP_INV_STATE_CONFIRMED) { 
     1715        pjmedia_sdp_neg_state neg_state; 
     1716        neg_state = pjmedia_sdp_neg_get_state(inv->neg); 
     1717        if (neg_state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER) { 
     1718            pjmedia_sdp_neg_cancel_remote_offer(inv->neg); 
     1719        } 
     1720    } 
    17121721 
    17131722    return PJ_SUCCESS; 
    17141723}