[Olsr-users] Broadcast Packets & Windows Routin
Erik Tromp
(spam-protected)
Sat Feb 23 15:54:49 CET 2008
>
> > Yes, thanks! But .... it is also polling :-((
> >
> > The call to 'olsr_select' inside 'poll_sockets' specifies
> a time-out
> > of struct timeval tvp = {0, 0};
> Okay, thats definitely a bug...
>
> Hannes, you are writing the new timer framework, is there a
> reason why we don't use the select timeout to wait for the
> next package and timer at the same time ?
Given the name of the function (poll_sockets) I would say it's
not a bug, but "works as designed" ;-)
But indeed it would be a nice new feature to replace the
quite useless 'nanosleep' for a duration of 'Pollrate' seconds
(default 50 msec) by a 'select' that waits for at most that time
but returns earlier if a packet arrives.
According to the man page of select(2):
"The select function may update the timeout parameter to indicate
how much time was left."
What worries me here is the word "may". It would be quite useful
to know the time left. But that is a worry for the implementor.
Hannes I will look into your timer handling refactoring as soon as
possible. I first need to set up this Mercurial stuff here...
Erik
More information about the Olsr-users
mailing list