* 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.
This commit is contained in:
Corinna Vinschen 2009-11-06 13:11:52 +00:00
parent 74ad9cc012
commit 1636ce3b32
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2009-11-06 Corinna Vinschen <corinna@vinschen.de>
* 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 <corinna@vinschen.de>
* transport_pipes.h (PIPE_NAME_PREFIX): New define.

View File

@ -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,