From: Francesco Chemolli Date: Thu, 29 Jan 2009 16:14:56 +0000 (+0100) Subject: Verified and converted String users. X-Git-Tag: SQUID_3_2_0_1~1212^2~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1945e7d46f4359b528702ca231ba16314f523d8;p=thirdparty%2Fsquid.git Verified and converted String users. --- diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index 3adaef4cea..1d0a31c86e 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -68,8 +68,8 @@ Adaptation::Config::dumpService(StoreEntry *entry, const char *name) const typedef Services::iterator SCI; for (SCI i = AllServices().begin(); i != AllServices().end(); ++i) { const ServiceConfig &cfg = (*i)->cfg(); - storeAppendPrintf(entry, "%s %s_%s %s %d %s\n", name, cfg.key.unsafeBuf(), - cfg.methodStr(), cfg.vectPointStr(), cfg.bypass, cfg.uri.unsafeBuf()); + storeAppendPrintf(entry, "%s %.*s_%s %s %d %.*s\n", name, cfg.key.size(), cfg.key.rawBuf(), + cfg.methodStr(), cfg.vectPointStr(), cfg.bypass, cfg.uri.size(), cfg.uri.rawBuf()); } } diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc index dd8b81ecd8..40b494cb7a 100644 --- a/src/adaptation/ServiceConfig.cc +++ b/src/adaptation/ServiceConfig.cc @@ -63,7 +63,7 @@ Adaptation::ServiceConfig::parse() ConfigParser::ParseString(&uri); debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " << - key.unsafeBuf() << " " << method_point << " " << bypass); + key << " " << method_point << " " << bypass); method = parseMethod(method_point); point = parseVectPoint(method_point); @@ -76,14 +76,14 @@ Adaptation::ServiceConfig::parse() // extract scheme and use it as the service_configConfig protocol const char *schemeSuffix = "://"; if (const char *schemeEnd = uri.pos(schemeSuffix)) - protocol.limitInit(uri.unsafeBuf(), schemeEnd - uri.unsafeBuf()); + protocol.limitInit(uri.rawBuf(), schemeEnd - uri.rawBuf()); //substring debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " << "service protocol is " << protocol); if (!protocol.size()) return false; // skip scheme - const char *s = uri.unsafeBuf() + protocol.size() + strlen(schemeSuffix); + const char *s = uri.termedBuf() + protocol.size() + strlen(schemeSuffix); const char *e; diff --git a/src/eCAP/MessageRep.cc b/src/eCAP/MessageRep.cc index 67291487ee..b8069bb44c 100644 --- a/src/eCAP/MessageRep.cc +++ b/src/eCAP/MessageRep.cc @@ -39,7 +39,7 @@ Ecap::HeaderRep::value(const Name &name) const const String value = squidId == HDR_OTHER ? theHeader.getByName(name.image().c_str()) : theHeader.getStrOrList(squidId); - return Value::FromTempString(value.unsafeBuf()); + return Value::FromTempString(value.termedBuf()); } void diff --git a/src/eCAP/ServiceRep.cc b/src/eCAP/ServiceRep.cc index 7bc0f4a6e3..91f3b94647 100644 --- a/src/eCAP/ServiceRep.cc +++ b/src/eCAP/ServiceRep.cc @@ -56,7 +56,7 @@ bool Ecap::ServiceRep::up() const bool Ecap::ServiceRep::wantsUrl(const String &urlPath) const { Must(up()); - return theService->wantsUrl(urlPath.unsafeBuf()); + return theService->wantsUrl(urlPath.termedBuf()); } Adaptation::Initiate * diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 2f193b5685..615b993f5c 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1175,7 +1175,7 @@ CossSwapDir::stripePath() const if (!stripe_path) { String result = path; result.append("/stripe"); - const_cast(this)->stripe_path = xstrdup(result.unsafeBuf()); + const_cast(this)->stripe_path = xstrdup(result.termedBuf()); } return stripe_path;