MCPcopy Create free account
hub / github.com/ceph/ceph / ms_dispatch2

Method ms_dispatch2

src/mgr/MgrClient.cc:104–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104Dispatcher::dispatch_result_t MgrClient::ms_dispatch2(const ref_t<Message>& m)
105{
106 std::lock_guard l(lock);
107
108 switch(m->get_type()) {
109 case MSG_MGR_MAP:
110 return handle_mgr_map(ref_cast<MMgrMap>(m));
111 case MSG_MGR_CONFIGURE:
112 return handle_mgr_configure(ref_cast<MMgrConfigure>(m));
113 case MSG_MGR_CLOSE:
114 return handle_mgr_close(ref_cast<MMgrClose>(m));
115 case MSG_COMMAND_REPLY:
116 if (m->get_source().type() == CEPH_ENTITY_TYPE_MGR) {
117 MCommandReply *c = static_cast<MCommandReply*>(m.get());
118 handle_command_reply(c->get_tid(), c->get_data(), c->rs, c->r);
119 return true;
120 } else {
121 return false;
122 }
123 case MSG_MGR_COMMAND_REPLY:
124 if (m->get_source().type() == CEPH_ENTITY_TYPE_MGR) {
125 MMgrCommandReply *c = static_cast<MMgrCommandReply*>(m.get());
126 handle_command_reply(c->get_tid(), c->get_data(), c->rs, c->r);
127 return true;
128 } else {
129 return false;
130 }
131 default:
132 ldout(cct, 30) << "Not handling " << *m << dendl;
133 return false;
134 }
135}
136
137void MgrClient::reconnect()
138{

Callers

nothing calls this directly

Calls 6

get_typeMethod · 0.45
typeMethod · 0.45
get_sourceMethod · 0.45
getMethod · 0.45
get_tidMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected