diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2013-03-01 17:55:59 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-03-25 12:32:19 +0100 |
commit | 8d706325f0c6445aa229438ae7d34c064c69be98 (patch) | |
tree | 338a6422781110bf27fcbeb9b9c53dd27240f156 /SpiceXPI/src/plugin/controller.cpp | |
parent | dcb89aaffb9b7f45cfbf760e2575a7cab57edce1 (diff) |
Add SpiceControllerWin class
This class implements the controller interface for Windows/mingw.
Diffstat (limited to 'SpiceXPI/src/plugin/controller.cpp')
-rw-r--r-- | SpiceXPI/src/plugin/controller.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp index ccef1d4..ac97ce1 100644 --- a/SpiceXPI/src/plugin/controller.cpp +++ b/SpiceXPI/src/plugin/controller.cpp @@ -97,6 +97,21 @@ int SpiceController::Connect(const int nRetries) g_usleep(sleep_time * G_USEC_PER_SEC); ++sleep_time; } + if (rc != 0) { + g_warning("error connecting"); + g_assert(m_pipe == NULL); + } + if (!CheckPipe()) { + g_warning("Pipe validation failure"); + g_warn_if_fail(m_pipe == NULL); + } + if (m_pipe == NULL) { + g_warning("failed to create pipe"); +#ifdef XP_WIN + rc = MAKE_HRESULT(1, FACILITY_CREATE_RED_PIPE, GetLastError()); +#endif + this->StopClient(); + } return rc; } |