mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Merge named_pipe_agent_exists() fix from 'pre-0.75'.
This commit is contained in:
commit
7f3a3a21eb
@ -147,9 +147,13 @@ Socket *agent_connect(Plug *plug)
|
||||
static bool named_pipe_agent_exists(void)
|
||||
{
|
||||
char *pipename = agent_named_pipe_name();
|
||||
DWORD type = GetFileType(pipename);
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE ffh = FindFirstFile(pipename, &data);
|
||||
sfree(pipename);
|
||||
return type == FILE_TYPE_PIPE;
|
||||
if (ffh == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
FindClose(ffh);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool agent_exists(void)
|
||||
|
Loading…
Reference in New Issue
Block a user