Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: remoting/host/wts_session_process_launcher_win.cc

Issue 10106013: Chromoting: stopping the service if the host ID is permanently not recognized by the could. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feeback. Rebased. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/url_request_context.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/wts_session_process_launcher_win.cc
diff --git a/remoting/host/wts_session_process_launcher_win.cc b/remoting/host/wts_session_process_launcher_win.cc
index c417144424f974e483b77ac3e8b87b219fbc1ae5..fe1d7d7f301c26cd6a90d23997832075ffae5f34 100644
--- a/remoting/host/wts_session_process_launcher_win.cc
+++ b/remoting/host/wts_session_process_launcher_win.cc
@@ -27,7 +27,7 @@
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
-
+#include "remoting/host/constants.h"
#include "remoting/host/chromoting_messages.h"
#include "remoting/host/sas_injector.h"
#include "remoting/host/wts_console_monitor_win.h"
@@ -37,10 +37,6 @@ using base::TimeDelta;
namespace {
-// The exit code returned by the host process when its configuration is not
-// valid.
-const int kInvalidHostConfigurationExitCode = 1;
-
// The minimum and maximum delays between attempts to inject host process into
// a session.
const int kMaxLaunchDelaySeconds = 60;
@@ -352,9 +348,11 @@ void WtsSessionProcessLauncher::OnObjectSignaled(HANDLE object) {
// Stop trying to restart the host if its process exited due to
// misconfiguration.
- DWORD exit_code;
- bool stop_trying = GetExitCodeProcess(process_.handle(), &exit_code) &&
- exit_code == kInvalidHostConfigurationExitCode;
+ int exit_code;
+ bool stop_trying =
+ base::WaitForExitCodeWithTimeout(process_.handle(), &exit_code, 0) &&
+ kMinPermanentErrorExitCode <= exit_code &&
+ exit_code <= kMaxPermanentErrorExitCode;
// The host process has been terminated for some reason. The handle can now be
// closed.
« no previous file with comments | « remoting/host/url_request_context.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698