[olsr-dev] Question plugin - olsr_event()
Tue Jan 18 11:12:01 CET 2005
> What is exactly passed to it, in
> code it has olsr_event(void *foo), is this a pointer or implicit function
> that is called. In the olsr_event function this foo parameter is not used
> at all.
You can register a pointer that is passed to the scheduled function. This
is the second parameter to the olsr_register_scheduler_event function.
Once upon a time this was probably usefull - but I can't remember wat case
this was used in right now :) Because of this the function to be
registered with the scheduler must be of the type void
(*event_function)(void *). So if you do not use the parameter you should
still decalre it in the funtion declaration(even though you might get away
with not doing so).
> The reason for this question is that Im trying to initiate this
> function when information arrives on a socket and not using the scheduler
> for a scheduled event, but for some reason its, not printing out the
> arriving entries. Everything in the code is the same except the following,
> which is inside a function which is registared with the socket parser to
> initiate this function when information arrives:
> add_olsr_socket(ipc_socket_di, &ipc_action_di);
Remember that to get any printout from olsr_event has_apm need to be !0
and also remember that the first printouts are using a debuglevel of 3 so
they will not be displayed if olsrd is running with a debuglevel < 3.
More information about the Olsr-dev