From: APTX Date: Sun, 25 Oct 2015 13:57:54 +0000 (+0100) Subject: Ensure the client only connects with IPv4. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=f32a6591126ec1c357b4946eb0e45f6d172812a3;p=anidbudpclient.git Ensure the client only connects with IPv4. AniDB does not support IPv6. --- diff --git a/client.cpp b/client.cpp index 7ebcdd4..52fa317 100644 --- a/client.cpp +++ b/client.cpp @@ -295,7 +295,11 @@ qDebug() << "Entering Connecting State"; qDebug() << "Host address is:" << m_hostAddress; if (!m_hostAddress.isNull()) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + if (socket->bind(QHostAddress::AnyIPv4, m_localPort)) +#else if (socket->bind(QHostAddress::Any, m_localPort)) +#endif { #ifdef ANIDBUDPCLIENT_CLIENT_MISC_DEBUG qDebug() << "Successful connection";