aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppStun.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2015-08-25 08:47:52 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2015-08-25 08:47:52 +0200
commit722c1fc2f807f6da6a9a7996dc86c23b61c554a8 (patch)
tree28fe978ff9a3c0dafa01304257edd44addec35a1 /src/base/QXmppStun.cpp
parenta1b7f17478ae64d27f8ee6cfe228ec12ab025da3 (diff)
downloadqxmpp-722c1fc2f807f6da6a9a7996dc86c23b61c554a8.tar.gz
ICE: store remote candidates
Diffstat (limited to 'src/base/QXmppStun.cpp')
-rw-r--r--src/base/QXmppStun.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp
index 793b207c..e4b33e7c 100644
--- a/src/base/QXmppStun.cpp
+++ b/src/base/QXmppStun.cpp
@@ -1644,6 +1644,7 @@ public:
QByteArray tieBreaker;
quint32 peerReflexivePriority;
+ QList<QXmppJingleCandidate> remoteCandidates;
QString remoteUser;
QString remotePassword;
@@ -1900,10 +1901,10 @@ bool QXmppIceComponent::addRemoteCandidate(const QXmppJingleCandidate &candidate
candidate.host().protocol() != QAbstractSocket::IPv6Protocol))
return false;
- foreach (CandidatePair *pair, d->pairs)
- if (pair->remote.host() == candidate.host() &&
- pair->remote.port() == candidate.port())
+ foreach (const QXmppJingleCandidate &c, d->remoteCandidates)
+ if (c.host() == candidate.host() && c.port() == candidate.port())
return false;
+ d->remoteCandidates << candidate;
foreach (QUdpSocket *socket, d->sockets) {
// do not pair IPv4 with IPv6 or global with link-local addresses