From 87e6a62e4fbb7dcc7e173b8ffacc4cf233e3af6e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 6 Apr 2014 13:18:40 -0700 Subject: [PATCH] mds: fix uninitialized fields in MDiscover Fixes: #7739 Signed-off-by: Sage Weil --- src/messages/MDiscoverReply.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/messages/MDiscoverReply.h b/src/messages/MDiscoverReply.h index 1623cf3113819..361a517b2e86b 100644 --- a/src/messages/MDiscoverReply.h +++ b/src/messages/MDiscoverReply.h @@ -127,7 +127,10 @@ class MDiscoverReply : public Message { flag_error_dn(false), flag_error_ino(false), flag_error_dir(false), - dir_auth_hint(CDIR_AUTH_UNKNOWN) { + unsolicited(false), + dir_auth_hint(CDIR_AUTH_UNKNOWN), + starts_with(DIR) + { header.tid = dis->get_tid(); } MDiscoverReply(dirfrag_t df) : @@ -141,7 +144,10 @@ class MDiscoverReply : public Message { flag_error_dn(false), flag_error_ino(false), flag_error_dir(false), - dir_auth_hint(CDIR_AUTH_UNKNOWN) { + unsolicited(false), + dir_auth_hint(CDIR_AUTH_UNKNOWN), + starts_with(DIR) + { header.tid = 0; } private: -- 2.39.5