~measurement-factory/squid/shared-ssl-sessions

« back to all changes in this revision

Viewing changes to src/peer_select.cc

  • Committer: Amos Jeffries
  • Date: 2013-03-04 02:12:43 UTC
  • Revision ID: squid3@treenet.co.nz-20130304021243-ue76v5cood4xswzs
Bug 3673: Silence 'Failed to select source' messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
#include "SquidConfig.h"
56
56
#include "SquidTime.h"
57
57
#include "Store.h"
 
58
#include "URL.h"
58
59
 
59
60
static struct {
60
61
    int timeouts;
286
287
    PSC *callback = psstate->callback;
287
288
    psstate->callback = NULL;
288
289
 
289
 
    if (psstate->paths->size() < 1) {
290
 
        debugs(44, DBG_IMPORTANT, "Failed to select source for '" << psstate->entry->url() << "'");
291
 
        debugs(44, DBG_IMPORTANT, "  always_direct = " << psstate->always_direct);
292
 
        debugs(44, DBG_IMPORTANT, "   never_direct = " << psstate->never_direct);
293
 
        debugs(44, DBG_IMPORTANT, "       timedout = " << psstate->ping.timedout);
294
 
    } else {
295
 
        debugs(44, 2, "Found sources for '" << psstate->entry->url() << "'");
296
 
        debugs(44, 2, "  always_direct = " << psstate->always_direct);
297
 
        debugs(44, 2, "   never_direct = " << psstate->never_direct);
 
290
    debugs(44, 2, (psstate->paths->size()<1?"Failed to select source":"Found sources") << " for '" << psstate->url() << "'");
 
291
    debugs(44, 2, "  always_direct = " << psstate->always_direct);
 
292
    debugs(44, 2, "   never_direct = " << psstate->never_direct);
 
293
    if (psstate->paths) {
298
294
        for (size_t i = 0; i < psstate->paths->size(); ++i) {
299
295
            if ((*psstate->paths)[i]->peerType == HIER_DIRECT)
300
296
                debugs(44, 2, "         DIRECT = " << (*psstate->paths)[i]);
305
301
            else
306
302
                debugs(44, 2, "     cache_peer = " << (*psstate->paths)[i]);
307
303
        }
308
 
        debugs(44, 2, "       timedout = " << psstate->ping.timedout);
309
304
    }
 
305
    debugs(44, 2, "       timedout = " << psstate->ping.timedout);
310
306
 
311
307
    psstate->ping.stop = current_time;
312
308
    psstate->request->hier.ping = psstate->ping;
972
968
    ; // no local defaults.
973
969
}
974
970
 
 
971
const char *
 
972
ps_state::url() const
 
973
{
 
974
    if (entry)
 
975
        return entry->url();
 
976
 
 
977
    if (request)
 
978
        return urlCanonical(request);
 
979
 
 
980
    return "[no URL]";
 
981
}
 
982
 
975
983
ping_data::ping_data() :
976
984
        n_sent(0),
977
985
        n_recv(0),