Ignore:
Timestamp:
Oct 24, 2011 9:28:13 AM (13 years ago)
Author:
ming
Message:

Re #1395: Backport of PJSIP 1.x branch into PJSIP 2.0 trunk

TODO: ticket #1268 (Option for automatic/manual sending of RTCP SDES/BYE for the stream) for video stream.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

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

    r3777 r3841  
    196196{ 
    197197    pjsip_inv_state prev_state = inv->state; 
     198    pj_bool_t dont_notify = PJ_FALSE; 
    198199    pj_status_t status; 
    199200 
     201    /* Prevent STATE_CALLING from being reported more than once because 
     202     * of authentication 
     203     * https://trac.pjsip.org/repos/ticket/1318 
     204     */ 
     205    if (state==PJSIP_INV_STATE_CALLING &&  
     206        (inv->cb_called & (1 << PJSIP_INV_STATE_CALLING)) != 0) 
     207    { 
     208        dont_notify = PJ_TRUE; 
     209    } 
    200210 
    201211    /* If state is confirmed, check that SDP negotiation is done, 
     
    225235              inv->cause != 0); 
    226236 
     237    /* Mark the callback as called for this state */ 
     238    inv->cb_called |= (1 << state); 
     239 
    227240    /* Call on_state_changed() callback. */ 
    228     if (mod_inv.cb.on_state_changed && inv->notify) 
     241    if (mod_inv.cb.on_state_changed && inv->notify && !dont_notify) 
    229242        (*mod_inv.cb.on_state_changed)(inv, e); 
    230243 
     
    41174130                const pjsip_hdr *accept; 
    41184131 
     4132                /* The incoming SDP is unacceptable. If the SDP negotiator 
     4133                 * state has just been changed, i.e: DONE -> REMOTE_OFFER, 
     4134                 * revert it back. 
     4135                 */ 
     4136                if (pjmedia_sdp_neg_get_state(inv->neg) == 
     4137                    PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER) 
     4138                { 
     4139                    pjmedia_sdp_neg_cancel_offer(inv->neg); 
     4140                } 
     4141 
    41194142                status = pjsip_dlg_create_response(inv->dlg, rdata,  
    41204143                                                   488, NULL, &tdata); 
Note: See TracChangeset for help on using the changeset viewer.