SCTP Discussions

Text archives Help


Re: AW: [SCTP-Discussion] Details about Timer.


Chronological Thread 
  • From: Andreas Jungmaier <ajung AT exp-math.uni-essen.de>
  • To: discussion AT sctp.de
  • Subject: Re: AW: [SCTP-Discussion] Details about Timer.
  • Date: Wed Aug 8 17:22:01 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi again,

I am sorry, but I _misread_ the code snippet.
Of course upon entering the callback function, the
timeout function will be passed the id of the
timer that has expired, as well as pointers to
parameters.
>
> Interesting, that the parameter timerId in the timer callback is
> uninitialized, but as I have to create a new one, that do not matter.
> >
> > In other words: Will the following C-fragment work or not?
> >
> > void timeout(
> > unsigned int timerid,
> > void * p1
> > void * p2)
> > {
> > sctp_restartTimer(timerid, 1000); /* Call me again one seconde later.
> > */
> > }
>
> timerid would be uninitialized in this case,
Again, sorry, this last statement is wrong.

>anyway, so that would not work !
But this is correct. You need to start a new timer.
As a restart is just the execution of a stop and a start
function, it is even *more optimal* this way
(i.e. less timer list handling involved)

Regards,
Andreas
--
---------------------------------------------------------------------------
Dipl.-Ing. Andreas Jungmaier | _
Computer Networking Technology Group | ASCII ribbon campaign ( )
University of Essen | - against HTML email X
http://www.exp-math.uni-essen.de/~ajung | & vcards / \




Archive powered by MHonArc 2.6.19+.

Top of page