Hi!

With http://gredler.at/hg/olsrd/rev/3568267161a9, all (in-tree) timers
got cookies.
So the following push - http://gredler.at/hg/olsrd/rev/dcf382d6f99a -
adds the assert()s which were used to track some missing ones down. The
rest was done with plain-old `grep and review` of all (other)
olsr_*_timer() call sites.
And they are there to enforce that it stays that way (and now naked ones
creeps in).

So if your shiny new patched olsrd and/or your shiny new plugin and you
are adding timers suddenly seg-faults, it is probably the simplest way
to find the place: to start an (unstripped?) version via `gdb --args
$PATH/olsrd -nofork`, wait for the seg-fault, `bt full` and fix the
offending line with the olsr_*_timer() call without cookie.

Doe we have an FAQ somewhere?
Q: How do I add a cookie to my shiny bright completely new most
   important timer?
A: Find another olsr_start_timer() call and see how it's done there. And
   then add 2 similar lines of code in the appropriate .c file.
[ Author's note: At least that's how I did it (who has completely
ignored the cookie stuff before). ]

Q: Can you show it to me nevertheless?
A: Yes, read http://gredler.at/hg/olsrd/rev/50b37a34433f ;-)

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




