[asterisk-dev] cdr_radius.c thread safety
Tilghman Lesher
tlesher at digium.com
Sun Jan 31 19:13:05 CST 2010
On Sunday 31 January 2010 05:39:30 Alex Massover wrote:
> I'm trying to understand if there's thread safety problem with cdr_radius
> module. I'm pretty new to Asterisk internals, so please correct me if I
> misunderstand something.
>
> AFAIU, cdr_radius.c load_module() called once upon loading the module, and
> it exports radius_log() function. Each call opens a thread, so radius_log()
> can be called from different threads and should be thread-safe.
>
> But the radiusclient-ng lib, the module uses, is neither thread-safe nor
> reentrant.
>
> Is it a potential problem or I just miss something?
It might be a potential problem, if the function that calls the backend
function did not serialize all requests. However, I'm curious as to what
resource you've cited as to the thread-safety of the library, as the history
of the FreeRADIUS library tends to suggest the opposite: that radiusclient-ng
is not only threadsafe, but also reentrant.
See http://wiki.freeradius.org/Radiusclient#History
--
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list