| 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..f797648685f280c9f460ec2745035cd1f17d8e21 100755
|
| --- a/remoting/tools/me2me_virtual_host.py
|
| +++ b/remoting/tools/me2me_virtual_host.py
|
| @@ -731,14 +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 ones used by the host.
|
| + # See remoting/host/constants.h.
|
| + # Delete the host or auth configuration depending on the returned error
|
| + # code, so the next time this script is run, a new configuration
|
| + # will be created and registered.
|
| + if os.WEXITSTATUS(status) == 2:
|
| + logging.info("Host configuration is invalid - exiting.")
|
| + os.remove(auth.config_file)
|
| + os.remove(host.config_file)
|
| + return 0
|
| + elif os.WEXITSTATUS(status) == 3:
|
| 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.
|
| os.remove(host.config_file)
|
| return 0
|
| -
|
| + elif os.WEXITSTATUS(status) == 4:
|
| + logging.info("OAuth credentials are invalid - exiting.")
|
| + os.remove(auth.config_file)
|
| + return 0
|
|
|
| if __name__ == "__main__":
|
| logging.basicConfig(level=logging.DEBUG)
|
|
|