summaryrefslogtreecommitdiff
path: root/vdservice
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-19 23:57:27 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-02-23 18:55:24 +0100
commit8ca8687fcc29e4c70ec196c3e892b2d58ea704f0 (patch)
tree9bbb0888c0c912817406bd60e9549dc15bba9eae /vdservice
parentb127e5fdae0c95115a5c1f2223593adf64dd5cf7 (diff)
Fix = use instead of ==
When checking for ConnectNamedPipe status, the error check uses if ( err = ERROR_IO_PENDING) instead of using == which causes this error check to always trigger. This commit fixes this, however it needs careful testing since the fact that it went unnoticed means the code with the bug was working as expected. Maybe changing it will cause unexpected regressions.
Diffstat (limited to 'vdservice')
-rw-r--r--vdservice/vdservice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp
index 29f4c9a..50a70c2 100644
--- a/vdservice/vdservice.cpp
+++ b/vdservice/vdservice.cpp
@@ -893,7 +893,7 @@ bool VDService::launch_agent()
ZeroMemory(&overlap, sizeof(overlap));
overlap.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
DWORD err = (ConnectNamedPipe(_pipe_state.pipe, &overlap) ? 0 : GetLastError());
- if (err = ERROR_IO_PENDING) {
+ if (err == ERROR_IO_PENDING) {
HANDLE wait_handles[2] = {overlap.hEvent, _agent_proc_info.hProcess};
DWORD wait_ret = WaitForMultipleObjects(2, wait_handles, FALSE, VD_AGENT_TIMEOUT);
if (wait_ret != WAIT_OBJECT_0) {