summaryrefslogtreecommitdiffstats
path: root/src/msg/Connection.cc
blob: 9183871b59429ec66add6b2ddf8c3c50427d3841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#include "msg/Connection.h"
#include "msg/Messenger.h"


bool Connection::is_blackhole() const {
  auto& conf = msgr->cct->_conf;

  switch (peer_type) {
  case CEPH_ENTITY_TYPE_MON:
    return conf->ms_blackhole_mon;
  case CEPH_ENTITY_TYPE_OSD:
    return conf->ms_blackhole_osd;
  case CEPH_ENTITY_TYPE_MDS:
    return conf->ms_blackhole_mds;
  case CEPH_ENTITY_TYPE_CLIENT:
    return conf->ms_blackhole_client;
  default:
    return false;
  }
}