[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] passing data between stages of a request
From:       Ben Hyde <bhyde () pobox ! com>
Date:       2000-05-01 12:10:45
[Download RAW message or body]


Yes, the notes table is really only for strings.  If your into
it you can recompile with another slot in the rec_record just for
you.

You can put a static variable in your module and keep a list
of your per-request data hanging off it, keyed by the request_rec*
Allocate the elements in the request's pool, and unlink them in
a cleanup function.  You ought to use a lock to serialize then
insert/remove operations.

If you can ignore the senarios where threads show up (windows today,
2.0 in most configurations tommorrow) then you can ignore the the
problem of multiple requests in parrallel.

 - ben

David Rosenstark wrote:
 > I am trying to write a module to enable me to pass data (a pointer to a
 > class) between stages of the request, i.e., I would like to create the class
 > in the postreadrequest stage but still use it in the handler.
 > The only data structure I have found for this has been the notes table but
 > this only takes null delimited strings. I assume I can use this by saving
 > the address of the memory in a string but is there a more straightforward
 > way to pass the data across?
 > 
 > TIA,
 > David

--
----------------------------------------------------------------
Apache Modules Mailing List            640 currently subscribed
----------------------------------------------------------------

If you wish to be removed from this list, send the word
'unsubscribe' to: apache-modules-request@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic