Changeset 5241 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Feb 5, 2016 4:29:17 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r5232 r5241 983 983 pjsip_tx_data *response = NULL; 984 984 unsigned options = 0; 985 pjsip_dialog *dlg = call->async_call.dlg; 985 986 int sip_err_code = (info? info->sip_err_code: 0); 986 987 pj_status_t status = (info? info->status: PJ_SUCCESS); 987 988 988 989 PJSUA_LOCK(); 990 991 /* Increment the dialog's lock to prevent it to be destroyed prematurely, 992 * such as in case of transport error. 993 */ 994 pjsip_dlg_inc_lock(dlg); 995 996 /* Decrement dialog session. */ 997 pjsip_dlg_dec_session(dlg, &pjsua_var.mod); 989 998 990 999 if (status != PJ_SUCCESS) { … … 997 1006 pjsua_media_channel_deinit(call->index); 998 1007 call->med_ch_cb = NULL; 1008 pjsip_dlg_dec_lock(dlg); 999 1009 PJSUA_UNLOCK(); 1000 1010 return PJ_SUCCESS; … … 1068 1078 } 1069 1079 } 1070 1080 1081 pjsip_dlg_dec_lock(dlg); 1082 1071 1083 PJSUA_UNLOCK(); 1072 1084 return status; … … 1352 1364 1353 1365 /* Create dialog: */ 1354 status = pjsip_dlg_create_uas ( pjsip_ua_instance(), rdata,1355 &contact, &dlg);1366 status = pjsip_dlg_create_uas_and_inc_lock( pjsip_ua_instance(), rdata, 1367 &contact, &dlg); 1356 1368 if (status != PJ_SUCCESS) { 1357 1369 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, … … 1460 1472 call->async_call.dlg = dlg; 1461 1473 pj_list_init(&call->async_call.call_var.inc_call.answers); 1474 1475 pjsip_dlg_inc_session(dlg, &pjsua_var.mod); 1462 1476 1463 1477 /* Init media channel, only when there is offer or call replace request. … … 1502 1516 pjsip_dlg_dec_lock(dlg); 1503 1517 1518 pjsip_dlg_dec_session(dlg, &pjsua_var.mod); 1519 1504 1520 call->inv = NULL; 1505 1521 call->async_call.dlg = NULL; … … 1619 1635 /* This INVITE request has been handled. */ 1620 1636 on_return: 1637 if (dlg) { 1638 pjsip_dlg_dec_lock(dlg); 1639 } 1640 1621 1641 pj_log_pop_indent(); 1622 1642 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.