Changeset 1319 for pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
- Timestamp:
- May 30, 2007 4:26:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r1250 r1319 1420 1420 struct tsx_lock_data lck; 1421 1421 1422 PJ_ASSERT_RETURN(tsx != NULL, PJ_EINVAL); 1423 1422 1424 PJ_LOG(5,(tsx->obj_name, "Request to terminate transaction")); 1423 1425 1424 PJ_ASSERT_RETURN(tsx != NULL, PJ_EINVAL);1425 1426 PJ_ASSERT_RETURN(code >= 200, PJ_EINVAL); 1426 1427 … … 1431 1432 tsx_set_status_code(tsx, code, NULL); 1432 1433 tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, PJSIP_EVENT_USER, NULL); 1434 unlock_tsx(tsx, &lck); 1435 1436 return PJ_SUCCESS; 1437 } 1438 1439 1440 /* 1441 * Cease retransmission on the UAC transaction. The UAC transaction is 1442 * still considered running, and it will complete when either final 1443 * response is received or the transaction times out. 1444 */ 1445 PJ_DEF(pj_status_t) pjsip_tsx_stop_retransmit(pjsip_transaction *tsx) 1446 { 1447 struct tsx_lock_data lck; 1448 1449 PJ_ASSERT_RETURN(tsx != NULL, PJ_EINVAL); 1450 PJ_ASSERT_RETURN(tsx->role == PJSIP_ROLE_UAC && 1451 tsx->method.id == PJSIP_INVITE_METHOD, 1452 PJ_EINVALIDOP); 1453 1454 PJ_LOG(5,(tsx->obj_name, "Request to stop retransmission")); 1455 1456 lock_tsx(tsx, &lck); 1457 /* Cancel retransmission timer. */ 1458 if (tsx->retransmit_timer.id != 0) { 1459 pjsip_endpt_cancel_timer(tsx->endpt, &tsx->retransmit_timer); 1460 tsx->retransmit_timer.id = 0; 1461 } 1433 1462 unlock_tsx(tsx, &lck); 1434 1463
Note: See TracChangeset
for help on using the changeset viewer.