~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to src/CommCalls.h

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
// All job dialers with comm parameters are merged into one since they
142
142
// all have exactly one callback argument and differ in Params type only
143
143
template <class C, class Params_>
144
 
class CommCbMemFunT: public JobDialer, public CommDialerParamsT<Params_>
 
144
class CommCbMemFunT: public JobDialer<C>, public CommDialerParamsT<Params_>
145
145
{
146
146
public:
147
147
    typedef Params_ Params;
148
148
    typedef void (C::*Method)(const Params &io);
149
149
 
150
 
    CommCbMemFunT(C *obj, Method meth): JobDialer(obj),
151
 
            CommDialerParamsT<Params>(obj), object(obj), method(meth) {}
 
150
    CommCbMemFunT(const CbcPointer<C> &job, Method meth): JobDialer<C>(job),
 
151
            CommDialerParamsT<Params_>(job.get()),
 
152
            method(meth) {}
152
153
 
153
154
    virtual bool canDial(AsyncCall &c) {
154
 
        return JobDialer::canDial(c) &&
 
155
        return JobDialer<C>::canDial(c) &&
155
156
               this->params.syncWithComm();
156
157
    }
157
158
 
162
163
    }
163
164
 
164
165
public:
165
 
    C *object;
166
166
    Method method;
167
167
 
168
168
protected:
169
 
    virtual void doDial() { (object->*method)(this->params); }
 
169
    virtual void doDial() { ((&(*this->job))->*method)(this->params); }
170
170
};
171
171
 
172
172