diff options
Diffstat (limited to 'chardev/char-pipe.c')
-rw-r--r-- | chardev/char-pipe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index 54240c863d..aae950a22b 100644 --- a/chardev/char-pipe.c +++ b/chardev/char-pipe.c @@ -58,27 +58,27 @@ static int win_chr_pipe_init(Chardev *chr, const char *filename, } openname = g_strdup_printf("\\\\.\\pipe\\%s", filename); - s->hcom = CreateNamedPipe(openname, + s->file = CreateNamedPipe(openname, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, MAXCONNECT, NSENDBUF, NRECVBUF, NTIMEOUT, NULL); g_free(openname); - if (s->hcom == INVALID_HANDLE_VALUE) { + if (s->file == INVALID_HANDLE_VALUE) { error_setg(errp, "Failed CreateNamedPipe (%lu)", GetLastError()); - s->hcom = NULL; + s->file = NULL; goto fail; } ZeroMemory(&ov, sizeof(ov)); ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - ret = ConnectNamedPipe(s->hcom, &ov); + ret = ConnectNamedPipe(s->file, &ov); if (ret) { error_setg(errp, "Failed ConnectNamedPipe"); goto fail; } - ret = GetOverlappedResult(s->hcom, &ov, &size, TRUE); + ret = GetOverlappedResult(s->file, &ov, &size, TRUE); if (!ret) { error_setg(errp, "Failed GetOverlappedResult"); if (ov.hEvent) { |