diff options
-rw-r--r-- | Source/cmServer.cxx | 6 | ||||
-rw-r--r-- | Source/cmServerProtocol.cxx | 6 | ||||
-rw-r--r-- | Source/cmServerProtocol.h | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 03e0115..61ebba3 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -83,7 +83,7 @@ void cmServer::ProcessRequest(cmConnection* connection, debug->PrintStatistics = debugValue["showStats"].asBool(); } - const cmServerRequest request(this, value[kTYPE_KEY].asString(), + const cmServerRequest request(this, connection, value[kTYPE_KEY].asString(), value[kCOOKIE_KEY].asString(), value); if (request.Type == "") { @@ -323,7 +323,7 @@ void cmServer::WriteProgress(const cmServerRequest& request, int min, obj[kPROGRESS_MAXIMUM_KEY] = max; obj[kPROGRESS_CURRENT_KEY] = current; - this->WriteJsonObject(obj, nullptr); + this->WriteJsonObject(request.Connection, obj, nullptr); } void cmServer::WriteMessage(const cmServerRequest& request, @@ -343,7 +343,7 @@ void cmServer::WriteMessage(const cmServerRequest& request, obj[kTITLE_KEY] = title; } - WriteJsonObject(obj, nullptr); + WriteJsonObject(request.Connection, obj, nullptr); } void cmServer::WriteParseError(cmConnection* connection, diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index defba77..ed1abe7 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -125,11 +125,13 @@ void getCMakeInputs(const cmGlobalGenerator* gg, const std::string& sourceDir, } // namespace -cmServerRequest::cmServerRequest(cmServer* server, const std::string& t, - const std::string& c, const Json::Value& d) +cmServerRequest::cmServerRequest(cmServer* server, cmConnection* connection, + const std::string& t, const std::string& c, + const Json::Value& d) : Type(t) , Cookie(c) , Data(d) + , Connection(connection) , m_Server(server) { } diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index 83b3d58..9902dfb 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -11,6 +11,7 @@ #include <string> #include <utility> +class cmConnection; class cmFileMonitor; class cmServer; class cmServerRequest; @@ -52,9 +53,11 @@ public: const std::string Type; const std::string Cookie; const Json::Value Data; + cmConnection* Connection; private: - cmServerRequest(cmServer* server, const std::string& t, const std::string& c, + cmServerRequest(cmServer* server, cmConnection* connection, + const std::string& t, const std::string& c, const Json::Value& d); void ReportProgress(int min, int current, int max, |