[Olsr-dev] Anon Timers
Hannes Gredler
(spam-protected)
Mon Jun 16 10:15:01 CEST 2008
Sven-Ola Tücke wrote:
> most timers are anonymous (does not use cookie). Just pushed my debug addon to
> the gredler.at repo. HTH
hmm i believe you are mistaken, the string already exists ....
you first need to allocate a cookie:
tc_edge_gc_timer_cookie = olsr_alloc_cookie("TC edge GC", OLSR_COOKIE_TYPE_TIMER);
by allocating the cookie you pass in also the cookie string.
and once you start a timer you need to pass the 16-bit cookie ID and not
the string itself.
e.g.
olsr_set_timer(&tc->edge_gc_timer, OLSR_TC_EDGE_GC_TIME,
OLSR_TC_EDGE_GC_JITTER, OLSR_TIMER_ONESHOT,
&olsr_expire_tc_edge_gc, tc, tc_edge_gc_timer_cookie->ci_id);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
thats enough to display the string "TC edge GC" ...
HTH,
have backed out your change.
/hannes
More information about the Olsr-dev
mailing list