MAuth *m = static_cast<MAuth*>(op->get_req());
dout(10) << "prep_auth() blob_size=" << m->get_auth_payload().length() << dendl;
- MonSession *s = (MonSession *)m->get_connection()->get_priv();
+ MonSession *s = op->get_session();
if (!s) {
dout(10) << "no session, dropping" << dendl;
return true;
MForward *m = static_cast<MForward*>(op->get_req());
dout(10) << "received forwarded message from " << m->client
<< " via " << m->get_source_inst() << dendl;
- MonSession *session = static_cast<MonSession *>(m->get_connection()->get_priv());
+ MonSession *session = op->get_session();
assert(session);
if (!session->is_capable("mon", MON_CAP_X)) {
void Monitor::handle_route(MonOpRequestRef op)
{
MRoute *m = static_cast<MRoute*>(op->get_req());
- MonSession *session = static_cast<MonSession *>(m->get_connection()->get_priv());
+ MonSession *session = op->get_session();
//check privileges
if (session && !session->is_capable("mon", MON_CAP_X)) {
dout(0) << "MRoute received from entity without appropriate perms! "
bool reuse_caps = false;
dout(20) << "have connection" << dendl;
- s = static_cast<MonSession *>(connection->get_priv());
+ s = op->get_session();
if (s && s->closed) {
caps = s->caps;
reuse_caps = true;
bool reply = false;
- MonSession *s = static_cast<MonSession *>(m->get_connection()->get_priv());
+ MonSession *s = op->get_session();
if (!s) {
dout(10) << " no session, dropping" << dendl;
return;
dout(10) << "handle_get_version " << *m << dendl;
PaxosService *svc = NULL;
- MonSession *s = static_cast<MonSession *>(m->get_connection()->get_priv());
+ MonSession *s = op->get_session();
if (!s) {
dout(10) << " no session, dropping" << dendl;
return;
if (!op->get_req()->get_connection()) {
ss << "connection dropped for command ";
} else {
- MonSession *s = m->get_session();
+ MonSession *s = op->get_session();
// if client drops we may not have a session to draw information from.
if (s) {