static void
aclDumpAttributeListWalkee(char * const & node_data, void *outlist)
{
- /* outlist is really a wordlist ** */
- wordlistAdd((wordlist **)outlist, node_data);
+ /* outlist is really a SBufList * */
+ static_cast<SBufList *>(outlist)->push_back(SBuf(node_data));
}
-wordlist *
-ACLCertificateData::dump()
+SBufList
+ACLCertificateData::dump() const
{
- wordlist *wl = NULL;
+ SBufList sl;
if (validAttributesStr)
- wordlistAdd(&wl, attribute);
+ sl.push_back(SBuf(attribute));
/* damn this is VERY inefficient for long ACL lists... filling
* a wordlist this way costs Sum(1,N) iterations. For instance
* a 1000-elements list will be filled in 499500 iterations.
*/
/* XXX FIXME: don't break abstraction */
- values.values->walk(aclDumpAttributeListWalkee, &wl);
- return wl;
+ values.values->walk(aclDumpAttributeListWalkee, &sl);
+ return sl;
}
void
ACLCertificateData &operator= (ACLCertificateData const &);
virtual ~ACLCertificateData();
bool match(X509 *);
- wordlist *dump();
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<X509 *> *clone() const;
virtual ~ACLDomainData();
bool match(char const *);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<char const *> *clone() const;
ACLHierCodeData &operator= (ACLHierCodeData const &);
virtual ~ACLHierCodeData();
bool match(hier_code);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<hier_code> *clone() const;
acl_httpstatus_data::acl_httpstatus_data(int x, int y) : status1(x), status2(y) { ; }
SBuf
-acl_httpstatus_data::repr() const
+acl_httpstatus_data::toStr() const
{
SBuf rv;
if (status2 == INT_MAX)
ret = aclHTTPStatusCompare(a, b);
if (ret == 0) {
- const SBuf sa = a->repr();
- const SBuf sb = b->repr();
+ const SBuf sa = a->toStr();
+ const SBuf sb = b->toStr();
debugs(28, DBG_CRITICAL, "WARNING: '" << sa << "' is a subrange of '" << sb << "'");
debugs(28, DBG_CRITICAL, "WARNING: because of this '" << sa << "' is ignored to keep splay tree searching predictable");
debugs(28, DBG_CRITICAL, "WARNING: You should probably remove '" << sb << "' from the ACL named '" << AclMatchedName << "'");
aclDumpHTTPStatusListWalkee(acl_httpstatus_data * const &node, void *state)
{
// state is a SBufList*
- static_cast<SBufList *>(state)->push_back(node->repr());
+ static_cast<SBufList *>(state)->push_back(node->toStr());
}
SBufList
int status1, status2;
acl_httpstatus_data(int);
acl_httpstatus_data(int, int);
- SBuf repr() const; // was toStr
+ SBuf toStr() const; // was toStr
static int compare(acl_httpstatus_data* const& a, acl_httpstatus_data* const& b);
};
ACLMethodData &operator= (ACLMethodData const &);
virtual ~ACLMethodData();
bool match(HttpRequestMethod);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<HttpRequestMethod> *clone() const;
ACLProtocolData &operator= (ACLProtocolData const &);
virtual ~ACLProtocolData();
bool match(AnyP::ProtocolType);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<AnyP::ProtocolType> *clone() const;
// template cbdata_type Ssl::Errors::CBDATA_CbDataList;
/** \endcond */
-wordlist *
-ACLSslErrorData::dump()
+SBufList
+ACLSslErrorData::dump() const
{
- wordlist *W = NULL;
+ SBufList sl;
Ssl::Errors *data = values;
-
while (data != NULL) {
- wordlistAdd(&W, Ssl::GetErrorName(data->element));
+ sl.push_back(SBuf(Ssl::GetErrorName(data->element)));
data = data->next;
}
-
- return W;
+ return sl;
}
void
ACLSslErrorData &operator= (ACLSslErrorData const &);
virtual ~ACLSslErrorData();
bool match(const Ssl::CertErrors *);
- wordlist *dump();
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLSslErrorData *clone() const;
ACLStringData &operator= (ACLStringData const &);
virtual ~ACLStringData();
bool match(char const *);
- SBufList dump() const;
+ virtual SBufList dump() const;
virtual void parse();
bool empty() const;
virtual ACLData<char const *> *clone() const;
ACLTimeData&operator=(ACLTimeData const &);
virtual ~ACLTimeData();
bool match(time_t);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<time_t> *clone() const;
virtual ~ACLUserData();
bool match(char const *user);
- SBufList dump() const;
+ virtual SBufList dump() const;
void parse();
bool empty() const;
virtual ACLData<char const *> *clone() const;
static void dump_sslproxy_ssl_bump(StoreEntry *entry, const char *name, acl_access *ssl_bump)
{
- if (ssl_bump) {
- wordlist *lines = ssl_bump->treeDump(name, Ssl::BumpModeStr);
- dump_wordlist(entry, lines);
- wordlistDestroy(&lines);
- }
+ if (ssl_bump)
+ dump_SBufList(entry, ssl_bump->treeDump(name, Ssl::BumpModeStr));
}
static void free_sslproxy_ssl_bump(acl_access **ssl_bump)