share variables in perl script (rlm_perl)

laurent.feron at free.fr laurent.feron at free.fr
Wed Dec 5 19:04:59 CET 2012


only 1 thread ? what 's about performance?
yes, many thanks, i will look at your code
Regards,
Laurent

----- Mail original -----
De: "Thomas Glanzmann" <thomas at glanzmann.de>
À: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org>
Envoyé: Samedi 1 Décembre 2012 16:11:35
Objet: Re: share variables in perl script (rlm_perl)

Hello Laurent,

> Meaning, when i start the first radtest that modifies the global
> variable, only the sixth request can view the global variable modified
> by the first request( i guess the sixth one turns into the first
> thread).

I had the very same problem when I was implementing the smsotp perl
module. I only noticed when the system was already in production. As a
quick work around I limited the radius threads to '1'. And than I used
berkeley db to save the state. Have a look at the smsotp code, it only
took 30 minutes to implement. It is very straight forward. You can use
also a database like postgresql to obtain the same.

http://thomas.glanzmann.de/smsotpd.2012-10-05.tar.bz2

Cheers,
        Thomas
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list