This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  8c0bc67bed33fb53816b478fbbfae809720cbdfa (commit)
       via  9112c43ebc96c8ea25042520f769cb1575439c22 (commit)
      from  3881d58885ad322596ceb98a66631b0f9a65bc3c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c0bc67bed33fb53816b478fbbfae809720cbdfa
commit 8c0bc67bed33fb53816b478fbbfae809720cbdfa
Merge: 3881d58 9112c43
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Oct 18 13:11:46 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Oct 18 13:11:46 2016 -0400

    Merge topic 'cmake-server-pipe-mode-fix' into next
    
    9112c43e server-mode: Fix named pipe mode


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9112c43ebc96c8ea25042520f769cb1575439c22
commit 9112c43ebc96c8ea25042520f769cb1575439c22
Author:     Tobias Hunger <tobias.hun...@qt.io>
AuthorDate: Tue Oct 18 15:20:40 2016 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Oct 18 10:55:01 2016 -0400

    server-mode: Fix named pipe mode
    
    Do not treat a pointer itself as a `uv_stream_t`, but instead the
    pointed-to `uv_pipe_t`.  It is unclear how this ever worked before in
    local testing.
    
    While at it, remove duplicate setup code and improve an error message.

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;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmServerConnection.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to