paxos_service[PAXOS_LOG] = new LogMonitor(this, add_paxos(PAXOS_LOG));
paxos_service[PAXOS_CLASS] = new ClassMonitor(this, add_paxos(PAXOS_CLASS));
paxos_service[PAXOS_AUTH] = new AuthMonitor(this, add_paxos(PAXOS_AUTH));
+
+ mon_caps = new MonCaps();
+ mon_caps->set_allow_all(true);
}
Paxos *Monitor::add_paxos(int type)
while (!session_map.sessions.empty()) {
session_map.remove_session(session_map.sessions.front());
}
-
+ delete mon_caps;
}
void Monitor::init()
msg->caps = &s->caps;
s->put();
}
+ } else { //it has to be a monitor if the Connection's not set
+ msg->caps = mon_caps;
}
}
}
//fill in caps field if possible
void fill_caps(Message *m);
+ //mon_caps is used for un-connected messages from monitors
+ MonCaps * mon_caps;
bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new);
bool ms_verify_authorizer(Connection *con, int peer_type,
int protocol, bufferlist& authorizer_data, bufferlist& authorizer_reply,