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

Unified Diff: remoting/tools/me2me_virtual_host.py

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: Exiting host cleanly + CR feedback. 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
« remoting/host/wts_session_process_launcher_win.cc ('K') | « remoting/remoting.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/me2me_virtual_host.py
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 69994d0be6f1c4bff823a408954840abab13f14a..d7432b12626fa512d4d8fbde66f4d3e893f4a55b 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -731,15 +731,24 @@ def main():
logging.info("Host process terminated")
desktop.host_proc = None
- # The exit-code must match the one used in HeartbeatSender.
- if os.WEXITSTATUS(status) == 100:
+ # These exit-codes must match the one used by the host.
Lambros 2012/04/17 19:01:19 s/one/ones or s/the one/those
alexeypa (please no reviews) 2012/04/17 19:20:32 Done.
+ # See remoting/host/constants.h.
+ if os.WEXITSTATUS(status) == 1:
Lambros 2012/04/17 19:01:19 Please don't use exit code number 1. The problem
alexeypa (please no reviews) 2012/04/17 19:20:32 Done.
+ logging.info("Host configuration is invalid - exiting.")
+ elif os.WEXITSTATUS(status) == 2:
logging.info("Host ID has been deleted - exiting.")
- # Host config is no longer valid. Delete it, so the next time this
- # script is run, a new Host ID will be created and registered.
+ elif os.WEXITSTATUS(status) == 3:
+ logging.info("OAuth credentials are invalid - exiting.")
+
+ # The host config is no longer valid if either of these codes is returned.
+ # Delete it, so the next time this script is run, a new configuration
+ # will be created and registered.
+ if os.WEXITSTATUS(status) == 1 or
+ os.WEXITSTATUS(status) == 2 or
+ os.WEXITSTATUS(status) == 3:
Lambros 2012/04/17 19:01:19 In case 3, should remove auth.config_file rather t
alexeypa (please no reviews) 2012/04/17 19:20:32 Done.
os.remove(host.config_file)
return 0
-
if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
sys.exit(main())
« remoting/host/wts_session_process_launcher_win.cc ('K') | « remoting/remoting.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698