- Timestamp:
- Oct 4, 2019 7:31:40 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r5984 r6087 314 314 inv->cb_called |= (1 << state); 315 315 316 /* Call on_state_changed() callback. */ 316 /* Call on_state_changed() callback. 317 * While in the callback, can the state shift to DISCONNECTED? Perhaps 318 * yes, so better avoid premature destroy of the invite session by 319 * temporarily increase its ref counter. 320 */ 321 pjsip_inv_add_ref(inv); 317 322 if (mod_inv.cb.on_state_changed && inv->notify && !dont_notify) 318 323 (*mod_inv.cb.on_state_changed)(inv, e); 324 pjsip_inv_dec_ref(inv); 319 325 320 326 /* Only decrement when previous state is not already DISCONNECTED */ 321 if ( inv->state == PJSIP_INV_STATE_DISCONNECTED &&327 if (state == PJSIP_INV_STATE_DISCONNECTED && 322 328 prev_state != PJSIP_INV_STATE_DISCONNECTED) 323 329 {
Note: See TracChangeset
for help on using the changeset viewer.