ldout(cct, 20) << __func__ << " got MSG header" << dendl;
- ceph_msg_header header;
- header = *((ceph_msg_header *)buffer);
+ current_header = *((ceph_msg_header *)buffer);
- ldout(cct, 20) << __func__ << " got envelope type=" << header.type << " src "
- << entity_name_t(header.src) << " front=" << header.front_len
- << " data=" << header.data_len << " off " << header.data_off
+ ldout(cct, 20) << __func__ << " got envelope type=" << current_header.type << " src "
+ << entity_name_t(current_header.src) << " front=" << current_header.front_len
+ << " data=" << current_header.data_len << " off " << current_header.data_off
<< dendl;
if (messenger->crcflags & MSG_CRC_HEADER) {
__u32 header_crc = 0;
- header_crc = ceph_crc32c(0, (unsigned char *)&header,
- sizeof(header) - sizeof(header.crc));
+ header_crc = ceph_crc32c(0, (unsigned char *)¤t_header,
+ sizeof(current_header) - sizeof(current_header.crc));
// verify header crc
- if (header_crc != header.crc) {
+ if (header_crc != current_header.crc) {
ldout(cct, 0) << __func__ << " got bad header crc " << header_crc
- << " != " << header.crc << dendl;
+ << " != " << current_header.crc << dendl;
return _fault();
}
}
front.clear();
middle.clear();
data.clear();
- current_header = header;
state = THROTTLE_MESSAGE;
return CONTINUE(throttle_message);
ldout(cct, 20) << __func__ << " got MSG header" << dendl;
- ceph_msg_header header;
- header = *((ceph_msg_header *)buffer);
+ current_header = *((ceph_msg_header *)buffer);
- ldout(cct, 20) << __func__ << " got envelope type=" << header.type << " src "
- << entity_name_t(header.src) << " front=" << header.front_len
- << " data=" << header.data_len << " off " << header.data_off
+ ldout(cct, 20) << __func__ << " got envelope type=" << current_header.type << " src "
+ << entity_name_t(current_header.src) << " front=" << current_header.front_len
+ << " data=" << current_header.data_len << " off " << current_header.data_off
<< dendl;
if (messenger->crcflags & MSG_CRC_HEADER) {
__u32 header_crc = 0;
- header_crc = ceph_crc32c(0, (unsigned char *)&header,
- sizeof(header) - sizeof(header.crc));
+ header_crc = ceph_crc32c(0, (unsigned char *)¤t_header,
+ sizeof(current_header) - sizeof(current_header.crc));
// verify header crc
- if (header_crc != header.crc) {
+ if (header_crc != current_header.crc) {
ldout(cct, 0) << __func__ << " got bad header crc " << header_crc
- << " != " << header.crc << dendl;
+ << " != " << current_header.crc << dendl;
return _fault();
}
}
front.clear();
middle.clear();
data.clear();
- current_header = header;
state = THROTTLE_MESSAGE;
return CONTINUE(throttle_message);