Skip to content

Commit

Permalink
messages: Update MAuthReply.h to work without using namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Adam C. Emerson <[email protected]>
  • Loading branch information
adamemerson committed Mar 29, 2019
1 parent 41b4b1c commit 73d6e7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/messages/MAuthReply.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class MAuthReply : public MessageInstance<MAuthReply> {
__u32 protocol;
errorcode32_t result;
uint64_t global_id; // if zero, meaningless
string result_msg;
bufferlist result_bl;
std::string result_msg;
ceph::buffer::list result_bl;

MAuthReply() : MessageInstance(CEPH_MSG_AUTH_REPLY), protocol(0), result(0), global_id(0) {}
MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = "") :
MAuthReply(__u32 p, ceph::buffer::list *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = "") :
MessageInstance(CEPH_MSG_AUTH_REPLY),
protocol(p), result(r), global_id(gid),
result_msg(msg) {
Expand All @@ -41,14 +41,15 @@ class MAuthReply : public MessageInstance<MAuthReply> {

public:
std::string_view get_type_name() const override { return "auth_reply"; }
void print(ostream& o) const override {
void print(std::ostream& o) const override {
o << "auth_reply(proto " << protocol << " " << result << " " << cpp_strerror(result);
if (result_msg.length())
o << ": " << result_msg;
o << ")";
}

void decode_payload() override {
using ceph::decode;
auto p = payload.cbegin();
decode(protocol, p);
decode(result, p);
Expand Down

0 comments on commit 73d6e7e

Please sign in to comment.