~kinkie/squid/sbuf

« back to all changes in this revision

Viewing changes to src/adaptation/Config.cc

  • Committer: Francesco Chemolli
  • Date: 2016-03-15 15:00:41 UTC
  • mfrom: (14472.1.119 trunk)
  • Revision ID: kinkie@squid-cache.org-20160315150041-6gntq8ulkda7v12d
MergedĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    typedef Services::iterator SCI;
158
158
    for (SCI i = AllServices().begin(); i != AllServices().end(); ++i) {
159
159
        const ServiceConfig &cfg = (*i)->cfg();
160
 
        storeAppendPrintf(entry, "%s " SQUIDSTRINGPH "_%s %s %d " SQUIDSTRINGPH "\n",
 
160
        bool isEcap = cfg.protocol.caseCmp("ecap") == 0;
 
161
        bool isIcap = !isEcap;
 
162
        const char *optConnectionEncryption = "";
 
163
        // Print connections_encrypted option if no default value is used
 
164
        if (cfg.secure.encryptTransport && !cfg.connectionEncryption)
 
165
            optConnectionEncryption = " connection-encryption=off";
 
166
        else if (isEcap && !cfg.connectionEncryption)
 
167
            optConnectionEncryption = " connection-encryption=off";
 
168
        else if (isIcap && !cfg.secure.encryptTransport && cfg.connectionEncryption)
 
169
            optConnectionEncryption = " connection-encryption=on";
 
170
 
 
171
        storeAppendPrintf(entry, "%s " SQUIDSTRINGPH " %s_%s %d " SQUIDSTRINGPH "%s\n",
161
172
                          name,
162
173
                          SQUIDSTRINGPRINT(cfg.key),
163
174
                          cfg.methodStr(), cfg.vectPointStr(), cfg.bypass,
164
 
                          SQUIDSTRINGPRINT(cfg.uri));
 
175
                          SQUIDSTRINGPRINT(cfg.uri),
 
176
 
 
177
                          optConnectionEncryption);
165
178
    }
166
179
}
167
180