AC_MSG_ERROR([eCAP support requires loadable modules. Please do not use --disable-loadable-modules with --enable-ecap.]);
fi
- dnl eCAP support requires libecap
- dnl This Squid supports libecap v0.2.x
- dnl Use EXT prefix or libtool will get confused with two libecaps:
- dnl one "external" (that we check for here) and one our own convenience lib
+ dnl eCAP support requires libecap.
+ dnl This Squid supports libecap v0.2.x.
+ dnl Use EXT prefix so that make and libtool messages distinguish between
+ dnl external libecap (that we check for here) and our own convenience lib.
PKG_CHECK_MODULES(EXTLIBECAP, [libecap > 0.2 libecap < 0.3])
fi
void
ServerStateData::handleAdaptationBlocked(const Adaptation::Answer &answer)
{
- debugs(11,5, HERE << "handleAdaptationBlocked: " << answer.ruleId);
+ debugs(11,5, HERE << answer.ruleId);
if (abortOnBadEntry("entry went bad while ICAP aborted"))
return;
Config(const Config &); // unsupported
Config &operator =(const Config &); // unsupported
- virtual ServicePointer createService(ServiceConfigPointer cfg) = 0;
+ virtual ServicePointer createService(const ServiceConfigPointer &cfg) = 0;
static void ParseServiceGroup(ServiceGroupPointer group);
static void FreeServiceGroups(void);
History.h
# add libraries for specific adaptation schemes
-libadaptation_la_LDFLAGS = $(EXTLIBECAP_LIBS)
-libadaptation_la_LIBADD = $(ECAP_LIBS) $(ICAP_LIBS)
+libadaptation_la_LIBADD = $(EXTLIBECAP_LIBS) $(ECAP_LIBS) $(ICAP_LIBS)
libadaptation_la_DEPENDENCIES = $(ECAP_LIBS) $(ICAP_LIBS)
#include "adaptation/ServiceFilter.h"
#include "adaptation/Service.h"
-Adaptation::Service::Service(ServiceConfigPointer aConfig): theConfig(aConfig)
+Adaptation::Service::Service(const ServiceConfigPointer &aConfig): theConfig(aConfig)
{
Must(theConfig != NULL);
debugs(93,3, HERE << "creating adaptation service " << cfg().key);
typedef String Id;
public:
- explicit Service(ServiceConfigPointer aConfig);
+ explicit Service(const ServiceConfigPointer &aConfig);
virtual ~Service();
virtual bool probed() const = 0; // see comments above
Adaptation::ServiceConfig::grokExtension(const char *name, const char *value)
{
// we do not accept extensions by default
- debugs(3, 0, cfg_filename << ':' << config_lineno << ": " <<
- "unknown adaptation service option: " << name << '=' << value);
+ debugs(3, DBG_CRITICAL, cfg_filename << ':' << config_lineno << ": " <<
+ "ERROR: unknown adaptation service option: " <<
+ name << '=' << value);
return false;
}
}
Adaptation::ServicePointer
-Adaptation::Ecap::Config::createService(ServiceConfigPointer cfg)
+Adaptation::Ecap::Config::createService(const ServiceConfigPointer &cfg)
{
return new Adaptation::Ecap::ServiceRep(cfg);
}
Config(const Config &); // not implemented
Config &operator =(const Config &); // not implemented
- virtual Adaptation::ServicePointer createService(ServiceConfigPointer cfg);
+ virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
};
extern Config TheConfig;
Registry.h
# add libecap using its pkg-config-produced configuration variables
-libxecap_la_CPPFLAGS = $(EXTLIBECAP_CFLAGS)
+libxecap_la_CXXFLAGS = $(EXTLIBECAP_CFLAGS)
-## It is tempting to put libxecap_la_LDFLAGS here, but it leads to weird
+## It is tempting to put libxecap_la_LDFLAGS/LIBADD here, but it leads to weird
## linking errors. For example, "make clean all" works, but rebuilding after
## modifying a single source file leads to libtool's "file not found" errors.
-## libxecap_la_LDFLAGS = $(EXTLIBECAP_LIBS)
+## libxecap_la_LIBADD = $(EXTLIBECAP_LIBS)
-Adaptation::Ecap::ServiceRep::ServiceRep(ServiceConfigPointer cfg):
+Adaptation::Ecap::ServiceRep::ServiceRep(const ServiceConfigPointer &cfg):
/*AsyncJob("Adaptation::Ecap::ServiceRep"),*/ Adaptation::Service(cfg),
isDetached(false)
{
class ServiceRep : public Adaptation::Service
{
public:
- ServiceRep(ServiceConfigPointer aConfig);
+ explicit ServiceRep(const ServiceConfigPointer &aConfig);
virtual ~ServiceRep();
typedef libecap::shared_ptr<libecap::adapter::Service> AdapterService;
}
Adaptation::ServicePointer
-Adaptation::Icap::Config::createService(ServiceConfigPointer cfg)
+Adaptation::Icap::Config::createService(const ServiceConfigPointer &cfg)
{
return new Adaptation::Icap::ServiceRep(cfg);
}
Config(const Config &); // not implemented
Config &operator =(const Config &); // not implemented
- virtual Adaptation::ServicePointer createService(ServiceConfigPointer cfg);
+ virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
};
extern Config TheConfig;
CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, ServiceRep);
-Adaptation::Icap::ServiceRep::ServiceRep(ServiceConfigPointer svcCfg):
+Adaptation::Icap::ServiceRep::ServiceRep(const ServiceConfigPointer &svcCfg):
AsyncJob("Adaptation::Icap::ServiceRep"), Adaptation::Service(svcCfg),
theOptions(NULL), theOptionsFetcher(0), theLastUpdate(0),
isSuspended(0), notifying(false),
typedef RefCount<ServiceRep> Pointer;
public:
- ServiceRep(ServiceConfigPointer aConfig);
+ explicit ServiceRep(const ServiceConfigPointer &aConfig);
virtual ~ServiceRep();
virtual void finalize();
An ICAP REQMOD or RESPMOD transaction may set an entry in the
shared table by returning an ICAP header field with a name
- specified in adaptation_masterx_shared_names. An eCAP REQMOD or
- RESPMOD transaction may set an entry in the shared table by
- implementing the libecap::visitEachOption() API to provide an
- option with a name specified in adaptation_masterx_shared_names.
+ specified in adaptation_masterx_shared_names.
+
+ An eCAP REQMOD or RESPMOD transaction may set an entry in the
+ shared table by implementing the libecap::visitEachOption() API
+ to provide an option with a name specified in
+ adaptation_masterx_shared_names.
Squid will store and forward the set entry to subsequent adaptation
transactions within the same master transaction scope.
define["USE_DELAY_POOLS"]="--enable-delay-pools"
define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for"
define["FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools"
- define["FOLLOW_X_FORWARDED_FOR&&ICAP_CLIENT"]="--enable-follow-x-forwarded-for and --enable-icap-client"
+ define["FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION"]="--enable-follow-x-forwarded-for and (--enable-icap-client and/or --enable-ecap)"
define["FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER"]="--enable-follow-x-forwarded-for and --enable-linux-netfilter"
define["USE_HTTP_VIOLATIONS"]="--enable-http-violations"
define["ICAP_CLIENT"]="--enable-icap-client"