decode(struct_v, indata);
decode(supported, indata);
decode(entity_name, indata);
- decode(s->global_id, indata);
+ decode(s->con->peer_global_id, indata);
} catch (const buffer::error &e) {
dout(10) << "failed to decode initial auth message" << dendl;
ret = -EINVAL;
/* assign a new global_id? we assume this should only happen on the first
request. If a client tries to send it later, it'll screw up its auth
session */
- if (!s->global_id) {
- s->global_id = assign_global_id(op, paxos_writable);
- if (!s->global_id) {
+ if (!s->con->peer_global_id) {
+ s->con->peer_global_id = assign_global_id(op, paxos_writable);
+ if (!s->con->peer_global_id) {
delete s->auth_handler;
s->auth_handler = NULL;
}
} else {
// request
- ret = s->auth_handler->handle_request(indata, response_bl, s->global_id, caps_info);
+ ret = s->auth_handler->handle_request(
+ indata,
+ response_bl,
+ s->con->peer_global_id,
+ caps_info);
}
if (ret == -EIO) {
wait_for_active(op, new C_RetryMessage(this,op));
}
reply:
- reply = new MAuthReply(proto, &response_bl, ret, s->global_id);
+ reply = new MAuthReply(proto, &response_bl, ret, s->con->peer_global_id);
mon->send_reply(op, reply);
if (finished) {
// always send the latest monmap.
dout(20) << " caps " << s->caps.get_str() << dendl;
if ((is_synchronizing() ||
- (s->global_id == 0 && !exited_quorum.is_zero())) &&
+ (!s->authenticated && !exited_quorum.is_zero())) &&
!src_is_mon &&
m->get_type() != CEPH_MSG_PING) {
waitlist_or_zap_client(op);