On Sat, 2008-02-23 at 14:42 +0100, Henrik Nordström wrote: > The idea with cbdata is that when you are given a cbdata enabled object > use cbdataReference on it to get a reference safe to be saved between > call events.
Sorry, my fault. I did not realize that cbdata API defines "cbdata reference" as something other than the "object pointer". I think I can rewrite those operations without violating the API. I think the code effectively does the right thing under the hood, but that is not the reason to violate the API. I agree that all this will become irrelevant once cbdata API is updated to use C++ mechanisms because accidental misuse like this one will be nearly impossible and proper use will come "naturally". We should dig out old notes on the subject and add cbdata/RefCounter work to Squid3 roadmap. FWIW, AsyncCalls changes, like this little fix, should not be backported to 3.0. Thank you, Alex.
