On Die, 2008-09-02 at 17:00 +0200, Bernd Petrovitsch wrote:
> On Tue, 2008-09-02 at 16:40 +0200, Hannes Gredler wrote:
> > On Tue, Sep 02, 2008 at 04:10:57PM +0200, Bernd Petrovitsch wrote:
> [...]
> > | Hmm, one should review all the times(2) calls though ....
> > 
> > does not appear to be that bad ...
> > 
> > hannes@texas:~/dev/olsrd$ grep -R "times(" *
> > src/main.c:  now_times = times(&tms_buf);
> > src/scheduler.c:    now_times = times(&tms_buf);
> > src/scheduler.c:    olsr_scheduler_sleep(times(&tms_buf) - now_times);
> > src/socket_parser.c:  now_times = times(&tms_buf);
> 
> ACK.

I just pushed http://gredler.at/hg/olsrd/raw-rev/cd8dadc46cd2.[0] It
compiles but is otherwise untested. Please review and/or try out.
It is the simple bug fix - s/times/clock_gettime/ or similar can be done
later anyways.
The "tms_buf" variable/s were BTW just there to make *BSD not seg-fault.

> Unless the uses of tms_buf or olsr_scheduler_sleep() are somewhat
> strange .....

It is strange but from another point of view. The polling select(2) loop
really needs some work.

	Bernd

[0]: Let's see if I got that right.
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services



