In plugin A init: TSHttpArgIndexReserve("shared_state_foo", "shared state data", &txn_slot);
In plugin B init: TSHttpArgIndexNameLookup("shared_state_foo", &txn_slot, &description); Now both plugins have the same value in their txn_slot. A must be init before B or perhaps do the lookup in a handler instead. Then you can use: TSHttpTxnArgSet(TSHttpTxn txnp, int arg_idx, void* arg); TSHttpTxnArgGet(TSHttpTxn txnp, int arg_idx); To get and set the data per transaction. Use a mutex where appropriate. There are also equivalent Ssn functions for dealing with sessions instead of transactions. The same ArgReserve and ArgNameLookup are used for both transactions and sessions. On Wed, Aug 1, 2012 at 9:48 AM, oksana fishman <oksana.fishman.1...@gmail.com> wrote: > Thank you for quick response. > Could you give a specific example? > I use TSContDataGet / TSContDataSet , and it doesn't work when using two > plugins. > > > On Wed, Aug 1, 2012 at 4:29 PM, Leif Hedstrom <zw...@apache.org> wrote: > >> On Aug 1, 2012, at 4:21 AM, oksana fishman <oksana.fishman.1...@gmail.com> >> wrote: >> >> > In the same plugin this is done by TSContDataGet / TSContDataSet >> > How to set data in some plugin, so that anythe plugin can get the data >> (in >> > a later stage) ? >> >> >> Look for the APIs to set/get Txn and Ssn data. >> >> -- Leif