diff options
author | Brad King <brad.king@kitware.com> | 2016-10-19 12:48:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-19 12:48:27 (GMT) |
commit | 050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 (patch) | |
tree | 68d488093d83e914751b3995f16cf3bd42731ec0 | |
parent | 674d76538e4f51f89a7a1a3746b32e6d7519568a (diff) | |
parent | 9112c43ebc96c8ea25042520f769cb1575439c22 (diff) | |
download | CMake-050ef26061b6b73cc7c48dd8e7180ee0e7d5c073.zip CMake-050ef26061b6b73cc7c48dd8e7180ee0e7d5c073.tar.gz CMake-050ef26061b6b73cc7c48dd8e7180ee0e7d5c073.tar.bz2 |
Merge topic 'cmake-server-pipe-mode-fix'
9112c43e server-mode: Fix named pipe mode
-rw-r--r-- | Source/cmServerConnection.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index a814d16..b4af52b 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -323,11 +323,10 @@ bool cmServerPipeConnection::DoSetup(std::string* errorMessage) ": " + uv_err_name(r); return false; } - auto serverStream = reinterpret_cast<uv_stream_t*>(&this->ServerPipe); - serverStream->data = this; + auto serverStream = reinterpret_cast<uv_stream_t*>(this->ServerPipe); if ((r = uv_listen(serverStream, 1, on_new_connection)) != 0) { - *errorMessage = std::string("Internal Error with ") + this->PipeName + - ": " + uv_err_name(r); + *errorMessage = std::string("Internal Error listening on ") + + this->PipeName + ": " + uv_err_name(r); return false; } @@ -340,7 +339,7 @@ void cmServerPipeConnection::TearDown() uv_close(reinterpret_cast<uv_handle_t*>(this->ClientPipe), &on_pipe_close); this->WriteStream->data = nullptr; } - uv_close(reinterpret_cast<uv_handle_t*>(&this->ServerPipe), &on_pipe_close); + uv_close(reinterpret_cast<uv_handle_t*>(this->ServerPipe), &on_pipe_close); this->ClientPipe = nullptr; this->ServerPipe = nullptr; @@ -364,7 +363,7 @@ void cmServerPipeConnection::Connect(uv_stream_t* server) this->ClientPipe = new uv_pipe_t; uv_pipe_init(this->Loop(), this->ClientPipe, 0); this->ClientPipe->data = this; - auto client = reinterpret_cast<uv_stream_t*>(&this->ClientPipe); + auto client = reinterpret_cast<uv_stream_t*>(this->ClientPipe); if (uv_accept(server, client) != 0) { uv_close(reinterpret_cast<uv_handle_t*>(client), nullptr); return; |