Commit 3ad92fa6 authored by jiayl's avatar jiayl Committed by Commit bot

Check if the connected socket id already exists for...

Check if the connected socket id already exists for P2PSocketDispatcherHost::OnAcceptIncomingTcpConnection

BUG=469152

Review URL: https://codereview.chromium.org/1020293002

Cr-Commit-Position: refs/heads/master@{#321609}
parent 5b7c9e08
......@@ -262,9 +262,15 @@ void P2PSocketDispatcherHost::OnAcceptIncomingTcpConnection(
P2PSocketHost* socket = LookupSocket(listen_socket_id);
if (!socket) {
LOG(ERROR) << "Received P2PHostMsg_AcceptIncomingTcpConnection "
"for invalid socket_id.";
"for invalid listen_socket_id.";
return;
}
if (LookupSocket(connected_socket_id) != NULL) {
LOG(ERROR) << "Received P2PHostMsg_AcceptIncomingTcpConnection "
"for duplicated connected_socket_id.";
return;
}
P2PSocketHost* accepted_connection =
socket->AcceptIncomingTcpConnection(remote_address, connected_socket_id);
if (accepted_connection) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment