| Index: remoting/protocol/client_message_dispatcher.cc
|
| diff --git a/remoting/protocol/client_message_dispatcher.cc b/remoting/protocol/client_message_dispatcher.cc
|
| index e0c2758ac7b62b4218f37e84a47a72e98e20fdde..68bf46179daed19cd8b15b47c6839b8456d5fc28 100644
|
| --- a/remoting/protocol/client_message_dispatcher.cc
|
| +++ b/remoting/protocol/client_message_dispatcher.cc
|
| @@ -39,19 +39,18 @@ void ClientMessageDispatcher::Initialize(
|
|
|
| void ClientMessageDispatcher::OnControlMessageReceived(
|
| ControlMessage* message, Task* done_task) {
|
| - // TODO(sergeyu): Add message validation.
|
| - if (message->has_notify_resolution()) {
|
| - client_stub_->NotifyResolution(
|
| - &message->notify_resolution(), done_task);
|
| - return;
|
| - } else if (message->has_begin_session_response()) {
|
| - client_stub_->BeginSessionResponse(
|
| - &message->begin_session_response().login_status(), done_task);
|
| - return;
|
| - } else {
|
| - LOG(WARNING) << "Invalid control message received.";
|
| + if (message->has_begin_session_response()) {
|
| + const BeginSessionResponse& response = message->begin_session_response();
|
| + if (response.has_login_status() &&
|
| + response.login_status().has_success()) {
|
| + client_stub_->BeginSessionResponse(
|
| + &response.login_status(), done_task);
|
| + return;
|
| + }
|
| }
|
|
|
| + LOG(WARNING) << "Invalid control message received.";
|
| +
|
| done_task->Run();
|
| delete done_task;
|
| }
|
|
|