[Osip] Problem with MESSAGE retransmission

Aymeric Moizard jack at atosc.org
Fri Feb 22 11:48:21 CET 2008



On Fri, 22 Feb 2008, Vadim Lebedev wrote:

> Hi Aymeric
>
>> The "Timer J" is supposed to fire 62*T1 which is 32 seconds so
>> the transaction is supposed to "eat" retransmission that will
>> happen during those 32seconds after the first final response was
>> sent.
>> 
> In that case the following code seems to be buggy.
> It does not compare with timer duration...

You can argue that "timer_j_start" is not named correctly, but
it's not bugguy.

When timer is started: "timer_j_start" is set to
                 "now + timer_j_length"

       osip_gettimeofday (&nist->nist_context->timer_j_start, NULL);
       add_gettimeofday (&nist->nist_context->timer_j_start,
                         nist->nist_context->timer_j_length);

then timer_j_start is compared to:
                 "now()"

so it's timeouted after the "timer_j_length" length


... Am'I wrong?

Aymeric MOIZARD / ANTISIP
amsip - http://www.antisip.com
osip2 - http://www.osip.org
eXosip2 - http://savannah.nongnu.org/projects/exosip/


> =======================
> osip_event_t *
> __osip_nist_need_timer_j_event (osip_nist_t * nist, state_t state, int 
> transactionid)
> {
> struct timeval now;
> gettimeofday (&now, NULL);
>
> if (nist == NULL)
>   return NULL;
> if (state == NIST_COMPLETED)
>   {
>     if (nist->timer_j_start.tv_sec == -1)
>   return NULL;
>     if (timercmp (&now, &nist->timer_j_start, >))
>   return __osip_event_new (TIMEOUT_J, transactionid);
>   }
> return NULL;
> }
>
>
> Thanks
> Vadim
>
> _______________________________________________
> Osip mailing list
> Osip at atosc.org
> http://www.atosc.org/mailinglist/listinfo/osip
>
>



More information about the Osip mailing list