Merge pull request #1864 from MartinHaimberger/namedpipefix

fixed introduced winpr bug in namedpipes
This commit is contained in:
Marc-André Moreau 2014-05-26 08:10:28 -04:00
commit ad8f031a88
2 changed files with 8 additions and 5 deletions

View File

@ -43,10 +43,6 @@ struct winpr_named_pipe
{
WINPR_HANDLE_DEF();
WINPR_NAMED_PIPE* pBaseNamedPipe;
DWORD dwRefCount;
int clientfd;
int serverfd;
@ -65,6 +61,10 @@ struct winpr_named_pipe
LPOVERLAPPED lpOverlapped;
fnRemoveBaseNamedPipeFromList pfnRemoveBaseNamedPipeFromList;
WINPR_NAMED_PIPE* pBaseNamedPipe;
DWORD dwRefCount;
};
#endif

View File

@ -271,8 +271,11 @@ int GetEventFileDescriptor(HANDLE hEvent)
if (Type == HANDLE_TYPE_NAMED_PIPE)
{
WINPR_NAMED_PIPE *named = (WINPR_NAMED_PIPE *)hEvent;
if (named->ServerMode)
if (named->ServerMode) {
return named->serverfd;
} else {
return named->clientfd;
}
}
return event->pipe_fd[0];