Changeset 3977 for pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Mar 15, 2012 9:37:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_call.c
r3954 r3977 3331 3331 pjsua_call *call; 3332 3332 3333 PJSUA_LOCK();3334 3335 3333 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3336 3334 3337 3335 if (!call) { 3338 PJSUA_UNLOCK();3339 3336 return; 3340 3337 } … … 3478 3475 if (inv->state == PJSIP_INV_STATE_DISCONNECTED) { 3479 3476 3480 pj_assert(call != NULL); 3481 3482 if (call) 3483 pjsua_media_channel_deinit(call->index); 3477 PJSUA_LOCK(); 3478 3479 pjsua_media_channel_deinit(call->index); 3484 3480 3485 3481 /* Free call */ 3486 3482 call->inv = NULL; 3483 3484 pj_assert(pjsua_var.call_cnt > 0); 3487 3485 --pjsua_var.call_cnt; 3488 3486 … … 3490 3488 reset_call(call->index); 3491 3489 3492 } 3493 3494 PJSUA_UNLOCK(); 3490 PJSUA_UNLOCK(); 3491 } 3495 3492 } 3496 3493 … … 3599 3596 //const pj_str_t st_update = {"UPDATE", 6}; 3600 3597 3601 PJSUA_LOCK();3602 3603 3598 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3604 3599 … … 3624 3619 } 3625 3620 3626 PJSUA_UNLOCK();3627 3621 return; 3628 3622 } … … 3636 3630 status); 3637 3631 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 3638 PJSUA_UNLOCK();3639 3632 return; 3640 3633 } … … 3646 3639 status); 3647 3640 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 3648 PJSUA_UNLOCK();3649 3641 return; 3650 3642 } … … 3665 3657 */ 3666 3658 /*pjsua_media_channel_deinit(call->index);*/ 3667 PJSUA_UNLOCK();3668 3659 return; 3669 3660 } … … 3678 3669 if (pjsua_var.ua_cfg.cb.on_call_media_state) 3679 3670 pjsua_var.ua_cfg.cb.on_call_media_state(call->index); 3680 3681 3682 PJSUA_UNLOCK();3683 3671 } 3684 3672 … … 3790 3778 pj_status_t status; 3791 3779 3792 PJSUA_LOCK();3793 3794 3780 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3795 3781 … … 3803 3789 if (status != PJ_SUCCESS) { 3804 3790 pjsua_perror(THIS_FILE, "Unable to create local SDP", status); 3805 PJSUA_UNLOCK();3806 3791 return; 3807 3792 } … … 3829 3814 if (status != PJ_SUCCESS) { 3830 3815 pjsua_perror(THIS_FILE, "Unable to set answer", status); 3831 PJSUA_UNLOCK();3832 3816 return; 3833 3817 } 3834 3835 PJSUA_UNLOCK();3836 3818 } 3837 3819 … … 3845 3827 pjsua_call *call; 3846 3828 pj_status_t status; 3847 3848 PJSUA_LOCK();3849 3829 3850 3830 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; … … 3867 3847 if (status != PJ_SUCCESS) { 3868 3848 pjsua_perror(THIS_FILE, "Unable to create local SDP", status); 3869 PJSUA_UNLOCK();3870 3849 return; 3871 3850 } 3872 3873 PJSUA_UNLOCK();3874 3851 } 3875 3852 … … 4308 4285 pjsua_call *call; 4309 4286 4310 PJSUA_LOCK();4311 4312 4287 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 4313 4288 4314 4289 if (call == NULL) { 4315 PJSUA_UNLOCK();4316 4290 return; 4317 4291 } … … 4323 4297 * receive another REFER for this call. 4324 4298 */ 4325 PJSUA_UNLOCK();4326 4299 return; 4327 4300 } … … 4335 4308 tsx->last_tx && tsx->last_tx->auth_retry) 4336 4309 { 4337 PJSUA_UNLOCK();4338 4310 return; 4339 4311 } … … 4381 4353 pjsip_dlg_respond( inv->dlg, rdata, PJSIP_SC_NOT_ACCEPTABLE_HERE, 4382 4354 NULL, &hdr_list, NULL ); 4383 PJSUA_UNLOCK();4384 4355 return; 4385 4356 } … … 4428 4399 } 4429 4400 } 4430 4431 4432 4433 PJSUA_UNLOCK();4434 4401 } 4435 4402 … … 4442 4409 pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 4443 4410 pjsip_redirect_op op; 4444 4445 PJSUA_LOCK();4446 4411 4447 4412 if (pjsua_var.ua_cfg.cb.on_call_redirected) { … … 4456 4421 } 4457 4422 4458 PJSUA_UNLOCK();4459 4460 4423 return op; 4461 4424 }
Note: See TracChangeset
for help on using the changeset viewer.