summaryrefslogtreecommitdiffstats
path: root/third_party/libjingle
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 21:40:57 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 21:40:57 +0000
commit1a68caf4706eb060eeb4710fb15dce698f220610 (patch)
treed50de344c6fa7e67e2bccb96719618cab1960a64 /third_party/libjingle
parent4619a58300167c7d119608c7970ee59dc4b8eff1 (diff)
downloadchromium_src-1a68caf4706eb060eeb4710fb15dce698f220610.zip
chromium_src-1a68caf4706eb060eeb4710fb15dce698f220610.tar.gz
chromium_src-1a68caf4706eb060eeb4710fb15dce698f220610.tar.bz2
Fixed bugs in libjingle's handling of connection errors.
BUG=32819 TEST=see bug Review URL: http://codereview.chromium.org/545150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libjingle')
-rw-r--r--third_party/libjingle/files/talk/base/physicalsocketserver.cc8
-rw-r--r--third_party/libjingle/files/talk/xmpp/xmppclient.cc2
2 files changed, 9 insertions, 1 deletions
diff --git a/third_party/libjingle/files/talk/base/physicalsocketserver.cc b/third_party/libjingle/files/talk/base/physicalsocketserver.cc
index 1eb9f3a..b05b44c 100644
--- a/third_party/libjingle/files/talk/base/physicalsocketserver.cc
+++ b/third_party/libjingle/files/talk/base/physicalsocketserver.cc
@@ -168,7 +168,13 @@ public:
SocketAddress addr2(addr);
if (addr2.IsUnresolved()) {
LOG(INFO) << "Resolving addr in PhysicalSocket::Connect";
- addr2.Resolve(); // TODO: Do this async later?
+ // TODO: Do this async later?
+ if (!addr2.Resolve()) {
+ LOG(LS_ERROR) << "Resolving addr failed";
+ UpdateLastError();
+ Close();
+ return SOCKET_ERROR;
+ }
}
sockaddr_in saddr;
addr2.ToSockAddr(&saddr);
diff --git a/third_party/libjingle/files/talk/xmpp/xmppclient.cc b/third_party/libjingle/files/talk/xmpp/xmppclient.cc
index c8e9a4b3..41cb77d 100644
--- a/third_party/libjingle/files/talk/xmpp/xmppclient.cc
+++ b/third_party/libjingle/files/talk/xmpp/xmppclient.cc
@@ -259,6 +259,8 @@ int
XmppClient::ProcessStartXmppLogin() {
// Done with pre-connect tasks - connect!
if (!d_->socket_->Connect(d_->server_)) {
+ d_->pre_engine_error_ = XmppEngine::ERROR_SOCKET;
+ d_->pre_engine_subcode_ = d_->socket_->GetError();
EnsureClosed();
return STATE_ERROR;
}