Thankyou will try that.

--- On Fri, 2/19/10, Alan DeKok <al...@deployingradius.com> wrote:


From: Alan DeKok <al...@deployingradius.com>
Subject: Re: modules instantiation
To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org>
Date: Friday, February 19, 2010, 6:07 PM


Latha Krishnamurthi wrote:
> I see that a new instance is getting created when the first one is busy
> handling a request. (I do this this by adding a sleep in the module and
> printing the threadid) I am expecting the xxx_instantiate function to
> get called each time a new instance is created (reading in the
> documentation).

  No.  The module is NOT having "a new instance created".

  A module "instance" is defined by a module configuration.  One
configuration: one instance.

  The "instance" data is *constant*.  The module gets called multiple
times simultaneously from multiple threads when multiple requests are
received.

> This does not happen. I am actually connecting to a
> server in the instantiate function and storing the socket id in the
> *instance, so that I can use it later in the authenticate etc.

  Why?

  Is that connection changing the way the module behaves?

> But it seems that the socket id is the same for all the instances.
> *instance seems to be shared by all the instances ??
>  
> Am I missing something/configuration, your help is grately appreciated.

  If you need to store data that is associated with a particulare
*request*, and is valid only for the lifetime of a request, see
request_data_add(), and request_data_get().

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



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

Reply via email to