Changeset 2811 for pjproject/branches/1.0/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Jun 25, 2009 1:01:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.0/pjsip/src/pjsua-lib/pjsua_call.c
r2802 r2811 449 449 } 450 450 451 /* Increment the dialog's lock otherwise when invite session creation 452 * fails the dialog will be destroyed prematurely. 453 */ 454 pjsip_dlg_inc_lock(dlg); 455 451 456 /* Calculate call's secure level */ 452 457 call->secure_level = get_secure_level(acc_id, dest_uri); … … 539 544 status); 540 545 541 /* Upon failure to send first request, both dialog andinvite546 /* Upon failure to send first request, the invite 542 547 * session would have been cleared. 543 548 */ 544 549 inv = NULL; 545 dlg = NULL;546 550 goto on_error; 547 551 } … … 552 556 *p_call_id = call_id; 553 557 558 pjsip_dlg_dec_lock(dlg); 554 559 pj_pool_release(tmp_pool); 555 560 PJSUA_UNLOCK(); … … 559 564 560 565 on_error: 566 if (dlg) { 567 /* This may destroy the dialog */ 568 pjsip_dlg_dec_lock(dlg); 569 } 570 561 571 if (inv != NULL) { 562 572 pjsip_inv_terminate(inv, PJSIP_SC_OK, PJ_FALSE); 563 } else if (dlg) {564 pjsip_dlg_terminate(dlg);565 573 } 566 574
Note: See TracChangeset
for help on using the changeset viewer.