From 44cf7adcc9fd0bf73363d4b74d019cd7a2b0a59d Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 8 Feb 2006 09:22:46 +0000 Subject: [PATCH] Fixed bug in INVITE server transaction for 2xx response git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@152 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_transaction.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c index a219f5d7c..a84e096b8 100644 --- a/pjsip/src/pjsip/sip_transaction.c +++ b/pjsip/src/pjsip/sip_transaction.c @@ -2019,12 +2019,27 @@ static pj_status_t tsx_on_state_proceeding_uas( pjsip_transaction *tsx, pjsip_tx_data_add_ref(tdata); } - /* Start timer J at 64*T1 for unreliable transport or zero for - * reliable transport. - */ - if (!tsx->is_reliable) { + /* Setup timeout timer: */ + + if (tsx->method.id == PJSIP_INVITE_METHOD) { + + /* Start Timer H at 64*T1 for INVITE server transaction, + * regardless of transport. + */ timeout = timeout_timer_val; + + } else if (PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport)==0) { + + /* For non-INVITE, start timer J at 64*T1 for unreliable + * transport. + */ + timeout = timeout_timer_val; + } else { + + /* Transaction terminates immediately for non-INVITE when + * reliable transport is used. + */ timeout.sec = timeout.msec = 0; }