]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Comm job callbacks need job's cbdata pointer, not a job pointer.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 Jan 2014 19:28:23 +0000 (12:28 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 Jan 2014 19:28:23 +0000 (12:28 -0700)
Otherwise, in complex inheritance hierarchies, some [inner] classes will
hit cbdata cookie assertions when scheduling Comm calls with callbacks.

src/CommCalls.h

index dba72d15546af996d1e1cf013b14eaba1cc577cb..084171b9281f0610b66a1695a25a7f4de9e2dcc3 100644 (file)
@@ -176,7 +176,7 @@ public:
     typedef void (C::*Method)(const Params &io);
 
     CommCbMemFunT(const CbcPointer<C> &aJob, Method aMeth): JobDialer<C>(aJob),
-            CommDialerParamsT<Params_>(aJob.get()),
+            CommDialerParamsT<Params_>(aJob->toCbdata()),
             method(aMeth) {}
 
     virtual bool canDial(AsyncCall &c) {