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

Method prepare_send_message

src/msg/async/ProtocolV1.cc:254–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void ProtocolV1::prepare_send_message(uint64_t features, Message *m,
255 ceph::buffer::list &bl) {
256 ldout(cct, 20) << __func__ << " m " << *m << dendl;
257
258 // associate message with Connection (for benefit of encode_payload)
259 ldout(cct, 20) << __func__ << (m->empty_payload() ? " encoding features " : " half-reencoding features ")
260 << features << " " << m << " " << *m << dendl;
261
262 // encode and copy out of *m
263 // in write_message we update header.seq and need recalc crc
264 // so skip calc header in encode function.
265 m->encode(features, messenger->crcflags, true);
266
267 bl.append(m->get_payload());
268 bl.append(m->get_middle());
269 bl.append(m->get_data());
270}
271
272void ProtocolV1::send_keepalive() {
273 ldout(cct, 10) << __func__ << dendl;

Callers

nothing calls this directly

Calls 5

empty_payloadMethod · 0.80
get_payloadMethod · 0.80
encodeMethod · 0.45
appendMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected