~chtsanti/squid/icap-max-connections

« back to all changes in this revision

Viewing changes to src/adaptation/ServiceConfig.cc

  • Committer: Christos Tsantilas
  • Date: 2009-02-18 22:18:35 UTC
  • mfrom: (9294.1.215 trunk)
  • Revision ID: chtsanti@users.sourceforge.net-20090218221835-lfxxe3bs8uhu0b1h
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
    method = parseMethod(method_point);
69
69
    point = parseVectPoint(method_point);
70
 
    safe_free(method_point);
71
70
 
72
71
    debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " <<
73
72
           "service_configConfig is " << methodStr() << "_" << vectPointStr());
76
75
 
77
76
    // extract scheme and use it as the service_configConfig protocol
78
77
    const char *schemeSuffix = "://";
79
 
    if (const char *schemeEnd = uri.pos(schemeSuffix))
80
 
        protocol.limitInit(uri.rawBuf(), schemeEnd - uri.rawBuf()); //substring
 
78
    if (const String::size_type schemeEnd=uri.find(schemeSuffix))
 
79
        protocol=uri.substr(0,schemeEnd-1);
 
80
 
81
81
    debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " <<
82
82
           "service protocol is " << protocol);
83
 
    if (!protocol.size())
 
83
 
 
84
    if (protocol.size() == 0)
84
85
        return false;
85
86
 
86
87
    // skip scheme
163
164
            if(value == NULL)
164
165
                return false;
165
166
            char *t;
166
 
            const long p = strtoul(value.unsafeBuf(), &t, 0);
 
167
            const long p = strtoul(value.termedBuf(), &t, 0);
167
168
            if (p <= 0)
168
169
                return false;
169
170
            default_xact_max = p;