summaryrefslogtreecommitdiff
path: root/src/messages
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2011-06-27 17:20:34 -0700
committerYehuda Sadeh <yehuda@hq.newdream.net>2011-06-27 17:21:05 -0700
commit01118352b90cf68f7936864f72c788cb03f82c48 (patch)
tree15de4438f6fbead39642b63677a22bebcab47ddd /src/messages
parent6d6b05d8b1d592c164c98eb10d67c2cbe8b33b5e (diff)
downloadceph-01118352b90cf68f7936864f72c788cb03f82c48.tar.gz
rados: encode bufferlist in watch-notify
Diffstat (limited to 'src/messages')
-rw-r--r--src/messages/MWatchNotify.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/messages/MWatchNotify.h b/src/messages/MWatchNotify.h
index d0fc4858c45..9c62ff91992 100644
--- a/src/messages/MWatchNotify.h
+++ b/src/messages/MWatchNotify.h
@@ -25,10 +25,11 @@ class MWatchNotify : public Message {
uint64_t ver;
uint64_t notify_id;
uint8_t opcode;
+ bufferlist bl;
MWatchNotify() : Message(CEPH_MSG_WATCH_NOTIFY) { }
- MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o) : Message(CEPH_MSG_WATCH_NOTIFY),
- cookie(c), ver(v), notify_id(i), opcode(o) { }
+ MWatchNotify(uint64_t c, uint64_t v, uint64_t i, uint8_t o, bufferlist b) : Message(CEPH_MSG_WATCH_NOTIFY),
+ cookie(c), ver(v), notify_id(i), opcode(o), bl(b) { }
private:
~MWatchNotify() {}
@@ -41,14 +42,17 @@ public:
::decode(cookie, p);
::decode(ver, p);
::decode(notify_id, p);
+ if (msg_ver >= 1)
+ ::decode(bl, p);
}
void encode_payload(CephContext *cct) {
- uint8_t msg_ver = 0;
+ uint8_t msg_ver = 1;
::encode(msg_ver, payload);
::encode(opcode, payload);
::encode(cookie, payload);
::encode(ver, payload);
::encode(notify_id, payload);
+ ::encode(bl, payload);
}
const char *get_type_name() { return "watch-notify"; }