summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Moizard <amoizard@gmail.com>2013-02-28 11:49:35 +0100
committerAymeric Moizard <amoizard@gmail.com>2013-02-28 11:49:35 +0100
commite07abc21252f0b8be603a96fe305ab5466364dd0 (patch)
tree8bd137476ddf4c76a6f86efc71431985f8d6eacc
parent050438ae8352a8bcf5a0fee473de62b58b1994b7 (diff)
downloadosip-e07abc21252f0b8be603a96fe305ab5466364dd0.tar.gz
switch to use DEFAULT_T2 instead of hardcoded 4000 for timer E and timer G
-rw-r--r--src/osip2/ist_fsm.c4
-rw-r--r--src/osip2/nict_fsm.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/osip2/ist_fsm.c b/src/osip2/ist_fsm.c
index b767422..f0d5a31 100644
--- a/src/osip2/ist_fsm.c
+++ b/src/osip2/ist_fsm.c
@@ -146,8 +146,8 @@ osip_ist_timeout_g_event (osip_transaction_t * ist, osip_event_t * evt)
int i;
ist->ist_context->timer_g_length = ist->ist_context->timer_g_length * 2;
- if (ist->ist_context->timer_g_length > 4000)
- ist->ist_context->timer_g_length = 4000;
+ if (ist->ist_context->timer_g_length > DEFAULT_T2)
+ ist->ist_context->timer_g_length = DEFAULT_T2;
osip_gettimeofday (&ist->ist_context->timer_g_start, NULL);
add_gettimeofday (&ist->ist_context->timer_g_start, ist->ist_context->timer_g_length);
diff --git a/src/osip2/nict_fsm.c b/src/osip2/nict_fsm.c
index 32ea06f..6664c20 100644
--- a/src/osip2/nict_fsm.c
+++ b/src/osip2/nict_fsm.c
@@ -183,11 +183,11 @@ osip_nict_timeout_e_event (osip_transaction_t * nict, osip_event_t * evt)
/* reset timer */
if (nict->state == NICT_TRYING) {
nict->nict_context->timer_e_length = nict->nict_context->timer_e_length * 2;
- if (nict->nict_context->timer_e_length > 4000)
- nict->nict_context->timer_e_length = 4000;
+ if (nict->nict_context->timer_e_length > DEFAULT_T2)
+ nict->nict_context->timer_e_length = DEFAULT_T2;
}
- else /* in PROCEEDING STATE, TIMER is always 4000 */
- nict->nict_context->timer_e_length = 4000;
+ else /* in PROCEEDING STATE, TIMER is always DEFAULT_T2 */
+ nict->nict_context->timer_e_length = DEFAULT_T2;
osip_gettimeofday (&nict->nict_context->timer_e_start, NULL);
add_gettimeofday (&nict->nict_context->timer_e_start, nict->nict_context->timer_e_length);