Changeset 3841 for pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
- Timestamp:
- Oct 24, 2011 9:28:13 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r3777 r3841 196 196 { 197 197 pjsip_inv_state prev_state = inv->state; 198 pj_bool_t dont_notify = PJ_FALSE; 198 199 pj_status_t status; 199 200 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 } 200 210 201 211 /* If state is confirmed, check that SDP negotiation is done, … … 225 235 inv->cause != 0); 226 236 237 /* Mark the callback as called for this state */ 238 inv->cb_called |= (1 << state); 239 227 240 /* 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) 229 242 (*mod_inv.cb.on_state_changed)(inv, e); 230 243 … … 4117 4130 const pjsip_hdr *accept; 4118 4131 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 4119 4142 status = pjsip_dlg_create_response(inv->dlg, rdata, 4120 4143 488, NULL, &tdata);
Note: See TracChangeset
for help on using the changeset viewer.