]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Verified and converted String users.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jan 2009 16:14:56 +0000 (17:14 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jan 2009 16:14:56 +0000 (17:14 +0100)
src/adaptation/Config.cc
src/adaptation/ServiceConfig.cc
src/eCAP/MessageRep.cc
src/eCAP/ServiceRep.cc
src/fs/coss/store_dir_coss.cc

index 3adaef4ceab4ccabd69de8b4ee03f2e6089a2ed4..1d0a31c86e798d95bd45e98458b4c18f5870d2ce 100644 (file)
@@ -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());
     }
 }
 
index dd8b81ecd8a90b788a5fd49faa58520d731a5bf7..40b494cb7a590edb8faec2b6c93871235949ddbd 100644 (file)
@@ -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;
 
index 67291487eed95550c2078db5e69eca59906adc58..b8069bb44c87192cd4e1bdf0ed1743a1872821df 100644 (file)
@@ -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
index 7bc0f4a6e375de144b742acbf253630c38de799c..91f3b946477b0b5cc87f4ea5c2a46e731865e202 100644 (file)
@@ -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 *
index 2f193b5685acb96ea5fe229a82a7f90c0a56c128..615b993f5c2d251d6d9b29637f6794ac55ed8382 100644 (file)
@@ -1175,7 +1175,7 @@ CossSwapDir::stripePath() const
     if (!stripe_path) {
         String result = path;
         result.append("/stripe");
-        const_cast<CossSwapDir *>(this)->stripe_path = xstrdup(result.unsafeBuf());
+        const_cast<CossSwapDir *>(this)->stripe_path = xstrdup(result.termedBuf());
     }
 
     return stripe_path;