From fd45f0311d634198060128001fac04ecbcefc808 Mon Sep 17 00:00:00 2001 From: Waley Chen Date: Mon, 14 Mar 2016 15:46:02 -0400 Subject: SERVER-20077 requestId field of message header should always be a signed integer --- src/mongo/executor/downconvert_find_and_getmore_commands.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mongo/executor/downconvert_find_and_getmore_commands.cpp') diff --git a/src/mongo/executor/downconvert_find_and_getmore_commands.cpp b/src/mongo/executor/downconvert_find_and_getmore_commands.cpp index 034c1f133cc..e03e8a0b2d4 100644 --- a/src/mongo/executor/downconvert_find_and_getmore_commands.cpp +++ b/src/mongo/executor/downconvert_find_and_getmore_commands.cpp @@ -56,7 +56,7 @@ namespace executor { namespace { -StatusWith> getBatchFromReply(std::uint32_t requestId, +StatusWith> getBatchFromReply(std::int32_t requestId, const Message& response) { auto header = response.header(); if (header.getNetworkOp() != mongo::opReply) { @@ -65,10 +65,10 @@ StatusWith> getBatchFromReply(std::uint32_t requ << mongo::networkOpToString(header.getNetworkOp())}; } - if (header.getResponseTo() != requestId) { + if (header.getResponseToMsgId() != requestId) { return {ErrorCodes::ProtocolError, str::stream() << "responseTo field of OP_REPLY header with value '" - << header.getResponseTo() << "' does not match requestId '" + << header.getResponseToMsgId() << "' does not match requestId '" << requestId << "'"}; } @@ -204,7 +204,7 @@ StatusWith downconvertFindCommandRequest(const RemoteCommandRequest& re return {std::move(message)}; } -StatusWith upconvertLegacyQueryResponse(std::uint32_t requestId, +StatusWith upconvertLegacyQueryResponse(std::int32_t requestId, StringData cursorNamespace, const Message& response) { auto swBatch = getBatchFromReply(requestId, response); @@ -248,7 +248,7 @@ StatusWith downconvertGetMoreCommandRequest(const RemoteCommandRequest& return {std::move(m)}; } -StatusWith upconvertLegacyGetMoreResponse(std::uint32_t requestId, +StatusWith upconvertLegacyGetMoreResponse(std::int32_t requestId, StringData cursorNamespace, const Message& response) { auto swBatch = getBatchFromReply(requestId, response); -- cgit v1.2.1