Changeset 4455
- Timestamp:
- Apr 3, 2013 12:54:37 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r4441 r4455 624 624 (*inv_state_handler[inv->state])(inv, e); 625 625 626 /* Call on_tsx_state */ 627 if (mod_inv.cb.on_tsx_state_changed && inv->notify) 626 /* Call on_tsx_state. CANCEL request is a special case and has been 627 * reported earlier in inv_respond_incoming_cancel() 628 */ 629 if (mod_inv.cb.on_tsx_state_changed && inv->notify && 630 !(tsx->method.id==PJSIP_CANCEL_METHOD && 631 e->body.tsx_state.type==PJSIP_EVENT_RX_MSG)) 632 { 628 633 (*mod_inv.cb.on_tsx_state_changed)(inv, tsx, e); 634 } 629 635 630 636 /* Clear invite transaction when tsx is confirmed. … … 2855 2861 static void inv_respond_incoming_cancel(pjsip_inv_session *inv, 2856 2862 pjsip_transaction *cancel_tsx, 2857 pjsip_ rx_data *rdata)2863 pjsip_event *e) 2858 2864 { 2859 2865 pjsip_tx_data *tdata; 2860 2866 pjsip_transaction *invite_tsx; 2867 pjsip_rx_data *rdata; 2861 2868 pj_str_t key; 2862 2869 pj_status_t status; 2870 2871 pj_assert(e->body.tsx_state.type == PJSIP_EVENT_RX_MSG); 2872 rdata = e->body.tsx_state.src.rdata; 2873 2874 /* https://trac.pjsip.org/repos/ticket/1651 2875 * Special treatment for CANCEL. Since here we're responding to CANCEL 2876 * automatically (including 487 to INVITE), application will see the 2877 * 200/OK response to CANCEL first in the callback, and then 487 to 2878 * INVITE, before the CANCEL request itself. And worse, pjsua application 2879 * may not see the CANCEL request at all because by the time the CANCEL 2880 * request is reported, call has been disconnected and further events 2881 * from the INVITE session has been suppressed. 2882 */ 2883 if (mod_inv.cb.on_tsx_state_changed && inv->notify) 2884 (*mod_inv.cb.on_tsx_state_changed)(inv, cancel_tsx, e); 2863 2885 2864 2886 /* See if we have matching INVITE server transaction: */ … … 3755 3777 */ 3756 3778 3757 inv_respond_incoming_cancel(inv, tsx, e ->body.tsx_state.src.rdata);3779 inv_respond_incoming_cancel(inv, tsx, e); 3758 3780 3759 3781 } … … 3879 3901 */ 3880 3902 3881 inv_respond_incoming_cancel(inv, tsx, e ->body.tsx_state.src.rdata);3903 inv_respond_incoming_cancel(inv, tsx, e); 3882 3904 3883 3905 } else if (tsx->role == PJSIP_ROLE_UAS &&
Note: See TracChangeset
for help on using the changeset viewer.