MWatchNotify()
: Message{CEPH_MSG_WATCH_NOTIFY, HEAD_VERSION, COMPAT_VERSION} { }
- MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o, ceph::buffer::list b)
+ MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o, ceph::buffer::list b, uint64_t n=0)
: Message{CEPH_MSG_WATCH_NOTIFY, HEAD_VERSION, COMPAT_VERSION},
cookie(c),
ver(v),
opcode(o),
bl(b),
return_code(0),
- notifier_gid(0) { }
+ notifier_gid(n) { }
private:
~MWatchNotify() override {}
encode(missed, bl);
bufferlist empty;
- MWatchNotify *reply(new MWatchNotify(cookie, version, notify_id,
- CEPH_WATCH_EVENT_NOTIFY_COMPLETE, empty));
- reply->notifier_gid = client_gid;
+ auto* const reply = new MWatchNotify(
+ cookie,
+ version,
+ notify_id,
+ CEPH_WATCH_EVENT_NOTIFY_COMPLETE,
+ empty,
+ client_gid);
reply->set_data(bl);
if (timed_out)
reply->return_code = -ETIMEDOUT;
{
dout(10) << "send_notify" << dendl;
MWatchNotify *notify_msg = new MWatchNotify(
- cookie, notif->version, notif->notify_id,
- CEPH_WATCH_EVENT_NOTIFY, notif->payload);
- notify_msg->notifier_gid = notif->client_gid;
+ cookie,
+ notif->version,
+ notif->notify_id,
+ CEPH_WATCH_EVENT_NOTIFY,
+ notif->payload,
+ notif->client_gid);
conn->send_message(notify_msg);
}