Ticket #362: Transaction timer I in Completed state should be zero for reliable transports (thanks Ivan F. Skripov)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1415 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
4e11f45b3b
commit
2d3aea2e0a
1 changed files with 15 additions and 2 deletions
|
@ -2640,6 +2640,8 @@ static pj_status_t tsx_on_state_completed_uas( pjsip_transaction *tsx,
|
|||
}
|
||||
|
||||
} else {
|
||||
pj_time_val timeout;
|
||||
|
||||
/* Process incoming ACK request. */
|
||||
|
||||
/* Cease retransmission. */
|
||||
|
@ -2649,11 +2651,22 @@ static pj_status_t tsx_on_state_completed_uas( pjsip_transaction *tsx,
|
|||
}
|
||||
tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED);
|
||||
|
||||
/* Start timer I in T4 interval (transaction termination). */
|
||||
/* Reschedule timeout timer. */
|
||||
pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer );
|
||||
tsx->timeout_timer.id = TIMER_ACTIVE;
|
||||
|
||||
/* Timer I is T4 timer for unreliable transports, and
|
||||
* zero seconds for reliable transports.
|
||||
*/
|
||||
if (PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport)==0) {
|
||||
timeout.sec = 0;
|
||||
timeout.msec = 0;
|
||||
} else {
|
||||
timeout.sec = t4_timer_val.sec;
|
||||
timeout.msec = t4_timer_val.msec;
|
||||
}
|
||||
pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer,
|
||||
&t4_timer_val);
|
||||
&timeout);
|
||||
|
||||
/* Move state to "Confirmed" */
|
||||
tsx_set_state( tsx, PJSIP_TSX_STATE_CONFIRMED,
|
||||
|
|
Loading…
Reference in a new issue