diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog index dbc28ba54..a92896aef 100644 --- a/winsup/cygserver/ChangeLog +++ b/winsup/cygserver/ChangeLog @@ -1,3 +1,10 @@ +2009-11-06 Corinna Vinschen + + * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes): + Check cygwin_internal for returning 0 rather than for != 0. + (transport_layer_pipes::accept): Add debug output. + (transport_layer_pipes::connect): Ditto. + 2009-10-31 Corinna Vinschen * transport_pipes.h (PIPE_NAME_PREFIX): New define. diff --git a/winsup/cygserver/transport_pipes.cc b/winsup/cygserver/transport_pipes.cc index 1a67d2044..b3aaae59d 100644 --- a/winsup/cygserver/transport_pipes.cc +++ b/winsup/cygserver/transport_pipes.cc @@ -91,7 +91,7 @@ transport_layer_pipes::transport_layer_pipes () wchar_t cyg_instkey[18]; wchar_t *p = wcpcpy (_pipe_name, PIPE_NAME_PREFIX); - if (cygwin_internal (CW_GET_INSTKEY, cyg_instkey)) + if (!cygwin_internal (CW_GET_INSTKEY, cyg_instkey)) wcpcpy (wcpcpy (p, cyg_instkey), PIPE_NAME_SUFFIX); #endif } @@ -134,6 +134,8 @@ transport_layer_pipes::accept (bool *const recoverable) const bool first_instance = (pipe_instance == 0); + debug ("Try to create named pipe: %ls", _pipe_name); + const HANDLE accept_pipe = CreateNamedPipeW (_pipe_name, (PIPE_ACCESS_DUPLEX @@ -279,6 +281,7 @@ transport_layer_pipes::connect () BOOL rc = TRUE; int retries = 0; + debug_printf ("Try to connect to named pipe: %W", _pipe_name); while (rc) { _hPipe = CreateFileW (_pipe_name,