summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 23:49:35 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 23:49:35 +0000
commite7f74dada8e347bde1e7e88e88d6fd3c9882375a (patch)
treed563b0762ffe6062005b24e277dd1bb4a8019aef /content
parent15ff0118ad82bfc4b89ad612f130fed0df512612 (diff)
downloadchromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.zip
chromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.tar.gz
chromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.tar.bz2
Added GetLocalAddress() in net::ClientSocket.
BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/6840033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 618043c..c5bfb65 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -86,22 +86,17 @@ void P2PSocketHostTcp::OnConnected(int result) {
}
net::IPEndPoint address;
- // TODO(sergeyu): Add GetLocalAddress() in TCPClientSocket.
- //
- // result = socket_->GetLocalAddress(&address);
- // if (result < 0) {
- // LOG(ERROR) << "P2PSocket::Init(): unable to get local address: "
- // << result;
- // OnError();
- // return false;
- // }
+ result = socket_->GetLocalAddress(&address);
+ if (result < 0) {
+ LOG(ERROR) << "P2PSocket::Init(): unable to get local address: "
+ << result;
+ OnError();
+ return;
+ }
VLOG(1) << "Local address: " << address.ToString();
-
state_ = STATE_OPEN;
-
message_sender_->Send(new P2PMsg_OnSocketCreated(routing_id_, id_, address));
-
DoRead();
}