Creating a timer within a module
Alejandro Pérez Méndez
alex at um.es
Tue May 9 11:53:47 CEST 2017
El 08/05/17 a las 21:18, Alejandro Pérez Méndez escribió:
>> You should create a thread in the modules initialization routine.
>> Then, call radius_event_list_corral() to get the main server event list.
>> That thread can do updates.
> Thanks. I'll look into it. I didn't want to make changes to rlm_realm,
> just to trustrouter.c. But if I need to create the thread there, so be
I've been trying to make this work, but I'm sure I'm doing something
wrong. When you say "You should create a thread in the modules
initialization routine." do you mean by using pthread_create() directly
or by using any of the thread primitives FR has (although those seem to
be intended only for handling REQUEST* objects).
I've also tried without creating a thread, but then the event's callback
seems to be called from the main server thread, precluding other tasks
to be executed until the callback is finished.
Even with a thread, how do I make events to be handled by that thread?
Or should the event trigger the execution of a thread?
More information about the Freeradius-Devel