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

List:       squid-dev
Subject:    Re: [squid-dev] Security::SessionPointer and Security::LockingPointer
From:       Amos Jeffries <squid3 () treenet ! co ! nz>
Date:       2016-02-10 5:48:46
Message-ID: 56BACF3E.4040205 () treenet ! co ! nz
[Download RAW message or body]

On 10/02/2016 9:04 a.m., Christos Tsantilas wrote:
> On 02/09/2016 07:31 PM, Amos Jeffries wrote:
>> On 10/02/2016 5:53 a.m., Christos Tsantilas wrote:
>>> Hi all,
>>>
>>> The short question:
>>> The Security::SessionPointer is a TidyPointer. Is it acceptable to
>>> convert it to a LockingPointer?
>>

> 
> The GnuTls API allow to attach user data to the gnutls_session_t
> objects. Someone can use the gnutls_session_set_ptr
> ()/gnutls_session_get_ptr () library funtions for this.
> We can attach a counter to gnutls_session_set_ptr which increased in
> Security::LockingPointer::resetAndLock() method and decreased in free
> function passed to Security::LockingPointer.
> 

Yes that should work. So long as the resetAndLock also checked that its
datum was not -1, which the non-session objects will pass it.

Amos

_______________________________________________
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev

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

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