Changeset 2750 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Jun 4, 2009 10:16:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2724 r2750 2902 2902 case PJSIP_INV_STATE_CONNECTING: 2903 2903 st_code = e->body.tsx_state.tsx->status_code; 2904 ev_state = PJSIP_EVSUB_STATE_ACTIVE; 2904 if (call->inv->state == PJSIP_INV_STATE_CONNECTING) 2905 ev_state = PJSIP_EVSUB_STATE_TERMINATED; 2906 else 2907 ev_state = PJSIP_EVSUB_STATE_ACTIVE; 2905 2908 break; 2906 2909 2910 #if 0 2911 /* We don't need this, as we've terminated the subscription in 2912 * CONNECTING state. 2913 */ 2907 2914 case PJSIP_INV_STATE_CONFIRMED: 2908 2915 /* When state is confirmed, send the final 200/OK and terminate … … 2912 2919 ev_state = PJSIP_EVSUB_STATE_TERMINATED; 2913 2920 break; 2921 #endif 2914 2922 2915 2923 case PJSIP_INV_STATE_DISCONNECTED: … … 3456 3464 if (!cont) { 3457 3465 pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL); 3466 } 3467 3468 /* If the call transfer has completed but the subscription is 3469 * not terminated, terminate it now. 3470 */ 3471 if (status_line.code/100 == 2 && !is_last) { 3472 pjsip_tx_data *tdata; 3473 3474 status = pjsip_evsub_initiate(sub, &pjsip_subscribe_method, 3475 0, &tdata); 3476 if (status == PJ_SUCCESS) 3477 status = pjsip_evsub_send_request(sub, tdata); 3458 3478 } 3459 3479 } … … 3735 3755 } 3736 3756 3757 if (call->inv == NULL) { 3758 /* Shouldn't happen. It happens only when we don't terminate the 3759 * server subscription caused by REFER after the call has been 3760 * transfered (and this call has been disconnected), and we 3761 * receive another REFER for this call. 3762 */ 3763 PJSUA_UNLOCK(); 3764 return; 3765 } 3766 3737 3767 /* Notify application callback first */ 3738 3768 if (pjsua_var.ua_cfg.cb.on_call_tsx_state) {
Note: See TracChangeset
for help on using the changeset viewer.