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

Unified Diff: remoting/host/daemon_process.cc

Issue 12544020: Remote RDP sessions, rather than the console, if curtain-mode is configured. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing remoting_unittests Created 7 years, 9 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 | « no previous file | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process.cc
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index c63051cf6cb4100181a33bb26ea4558daa658bee..2fcf3d8c1a163ecddb703b18df9317735367e11a 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -184,6 +184,9 @@ void DaemonProcess::CreateDesktopSession(int terminal_id,
return;
}
+ // Terminal IDs cannot be reused. Update the expected next terminal ID.
+ next_terminal_id_ = std::max(next_terminal_id_, terminal_id + 1);
+
// Validate |params|.
if (params.client_dpi_.x() < 0 || params.client_dpi_.y() < 0) {
LOG(ERROR) << "Invalid DPI of the remote screen specified: "
@@ -203,18 +206,15 @@ void DaemonProcess::CreateDesktopSession(int terminal_id,
// Create the desktop session.
scoped_ptr<DesktopSession> session = DoCreateDesktopSession(
terminal_id, params, virtual_terminal);
- if (session) {
- VLOG(1) << "Daemon: opened desktop session " << terminal_id;
- desktop_sessions_.push_back(session.release());
- } else {
+ if (!session) {
LOG(ERROR) << "Failed to create a desktop session.";
SendToNetwork(
new ChromotingDaemonNetworkMsg_TerminalDisconnected(terminal_id));
return;
}
- // Update the expected terminal ID.
- next_terminal_id_ = std::max(next_terminal_id_, terminal_id + 1);
+ VLOG(1) << "Daemon: opened desktop session " << terminal_id;
+ desktop_sessions_.push_back(session.release());
}
void DaemonProcess::CrashNetworkProcess(
« no previous file with comments | « no previous file | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698