]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/Message: use old footer for encoded message dump
authorSage Weil <sage@inktank.com>
Thu, 11 Jul 2013 18:42:02 +0000 (11:42 -0700)
committerSage Weil <sage@inktank.com>
Thu, 11 Jul 2013 18:42:02 +0000 (11:42 -0700)
This avoids the need for a conditional decoding check on ceph-dencoder,
and makes it match up with what encode_message() is doing.  The new(ish)
fields in the footer (the signature) is not useful for the object
corpus.

Signed-off-by: Sage Weil <sage@inktank.com>
src/msg/Message.cc

index dddf30f3e04cdf3a7de5ba0cfbe6ef53ca0b0806..b9dc54848db438aa9bd2cd2ff0ed444b636fa988 100644 (file)
@@ -190,7 +190,15 @@ void Message::encode(uint64_t features, bool datacrc)
 #ifdef ENCODE_DUMP
     bufferlist bl;
     ::encode(get_header(), bl);
-    ::encode(get_footer(), bl);
+
+    // dump the old footer format
+    ceph_msg_footer_old old_footer;
+    old_footer.front_crc = footer.front_crc;
+    old_footer.middle_crc = footer.middle_crc;
+    old_footer.data_crc = footer.data_crc;
+    old_footer.flags = footer.flags;
+    ::encode(old_footer, bl);
+
     ::encode(get_payload(), bl);
     ::encode(get_middle(), bl);
     ::encode(get_data(), bl);