diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2011-02-03 16:04:13 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2011-02-03 16:04:13 +0000 |
| commit | 157327f910fea252d7b8034ffaf6eaedeae68a0c (patch) | |
| tree | 9e75353821d38caaa8b359aebc886498cf5cc8dc /src/QXmppStun.cpp | |
| parent | f3c9b7bedfa7514e2f6454cd6a32ae45b44054ad (diff) | |
| download | qxmpp-157327f910fea252d7b8034ffaf6eaedeae68a0c.tar.gz | |
QXmppIceConnection::setStunServer() should not perform DNS queries
(no impact as it is currently unused, but for future API compatibility)
Diffstat (limited to 'src/QXmppStun.cpp')
| -rw-r--r-- | src/QXmppStun.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/QXmppStun.cpp b/src/QXmppStun.cpp index 90129592..4a859dc2 100644 --- a/src/QXmppStun.cpp +++ b/src/QXmppStun.cpp @@ -1545,29 +1545,11 @@ void QXmppIceConnection::setRemotePassword(const QString &password) /// Sets the STUN server to use to determine server-reflexive addresses /// and ports. /// -/// \param hostName The host name or address of the STUN server. -/// \param port The port of the STUN server. +/// \param host The address of the STUN server. +/// \param port The port of the STUN server. -void QXmppIceConnection::setStunServer(const QString &hostName, quint16 port) +void QXmppIceConnection::setStunServer(const QHostAddress &host, quint16 port) { - // lookup STUN server - QHostAddress host; - QHostInfo hostInfo = QHostInfo::fromName(hostName); - foreach (const QHostAddress &address, hostInfo.addresses()) - { - if (address.protocol() == QAbstractSocket::IPv4Protocol) - { - host = address; - break; - } - } - if (host.isNull()) - { - warning(QString("Could not lookup STUN server %1").arg(hostName)); - return; - } - - // store STUN server m_stunHost = host; m_stunPort = port; foreach (QXmppIceComponent *socket, m_components.values()) |
