From f13fd58385950141fa8ba39f6f715959be67b823 Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Mon, 30 Jun 2014 20:12:53 +0200 Subject: [PATCH] Remove "m_fd" - unused field of RequestContext Change-Id: I869ff96dea13b9eeac216d9af2159ebb3aaecedf --- src/client/sockets/SocketClient.cpp | 3 +-- src/common/request/RequestContext.h | 5 ++--- src/service/sockets/SocketManager.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/sockets/SocketClient.cpp b/src/client/sockets/SocketClient.cpp index 7d47d48..9bab9b1 100644 --- a/src/client/sockets/SocketClient.cpp +++ b/src/client/sockets/SocketClient.cpp @@ -45,8 +45,7 @@ SocketClient::SocketClient() : m_socket(clientSocketPath), ResponsePtr SocketClient::askCynaraServer(RequestPtr request) { //pass request to protocol - RequestContextPtr context = std::make_shared(-1, ResponseTakerPtr(), - m_writeQueue); + RequestContextPtr context = std::make_shared(ResponseTakerPtr(), m_writeQueue); request->execute(request, m_protocol, context); //send request to cynara diff --git a/src/common/request/RequestContext.h b/src/common/request/RequestContext.h index dd003c8..b5e518d 100644 --- a/src/common/request/RequestContext.h +++ b/src/common/request/RequestContext.h @@ -34,13 +34,12 @@ namespace Cynara { class RequestContext { private: - int m_desc; ResponseTakerWeakPtr m_responseTaker; BinaryQueue &m_responseQueue; public: - RequestContext(int desc, ResponseTakerPtr responseTaker, BinaryQueue &responseQueue) - : m_desc(desc), m_responseTaker(responseTaker), m_responseQueue(responseQueue) { + RequestContext(ResponseTakerPtr responseTaker, BinaryQueue &responseQueue) + : m_responseTaker(responseTaker), m_responseQueue(responseQueue) { } void returnResponse(RequestContextPtr self, ResponsePtr response) const { diff --git a/src/service/sockets/SocketManager.cpp b/src/service/sockets/SocketManager.cpp index e1633d9..7c7adeb 100644 --- a/src/service/sockets/SocketManager.cpp +++ b/src/service/sockets/SocketManager.cpp @@ -227,7 +227,7 @@ bool SocketManager::handleRead(int fd, const RawBuffer &readbuffer) { LOGD("request extracted"); //build context - auto context = std::make_shared(fd, desc.responseTaker(), + auto context = std::make_shared(desc.responseTaker(), desc.writeQueue()); //pass request to request taker req->execute(req, requestTaker(), context); -- 2.7.4