Changeset 2593 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
- Timestamp:
- Apr 14, 2009 11:10:31 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
r2394 r2593 1443 1443 } 1444 1444 1445 /* Increment the dialog's lock otherwise when presence session creation 1446 * fails the dialog will be destroyed prematurely. 1447 */ 1448 pjsip_dlg_inc_lock(buddy->dlg); 1449 1445 1450 status = pjsip_pres_create_uac( buddy->dlg, &pres_callback, 1446 1451 PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub); … … 1449 1454 pjsua_perror(THIS_FILE, "Unable to create presence client", 1450 1455 status); 1451 pjsip_dlg_terminate(buddy->dlg); 1456 /* This should destroy the dialog since there's no session 1457 * referencing it 1458 */ 1459 pjsip_dlg_dec_lock(buddy->dlg); 1452 1460 if (tmp_pool) pj_pool_release(tmp_pool); 1453 1461 return; … … 1482 1490 status = pjsip_pres_initiate(buddy->sub, -1, &tdata); 1483 1491 if (status != PJ_SUCCESS) { 1492 pjsip_dlg_dec_lock(buddy->dlg); 1484 1493 if (buddy->sub) { 1485 1494 pjsip_pres_terminate(buddy->sub, PJ_FALSE); … … 1496 1505 status = pjsip_pres_send_request(buddy->sub, tdata); 1497 1506 if (status != PJ_SUCCESS) { 1507 pjsip_dlg_dec_lock(buddy->dlg); 1498 1508 if (buddy->sub) { 1499 1509 pjsip_pres_terminate(buddy->sub, PJ_FALSE); … … 1506 1516 } 1507 1517 1518 pjsip_dlg_dec_lock(buddy->dlg); 1508 1519 if (tmp_pool) pj_pool_release(tmp_pool); 1509 1520 }
Note: See TracChangeset
for help on using the changeset viewer.