All pastes #2073447 Raw Edit

Anonymous

public text v1 · immutable
#2073447 ·published 2011-06-01 23:48 UTC
rendered paste body
diff --git a/mythtv/libs/libmythupnp/upnpdevice.cpp b/mythtv/libs/libmythupnp/upnpdevice.cpp
index d121dcb..6b49297 100644
--- a/mythtv/libs/libmythupnp/upnpdevice.cpp
+++ b/mythtv/libs/libmythupnp/upnpdevice.cpp
@@ -357,14 +357,14 @@ void UPnpDeviceDesc::GetValidXML(
     QString BaseAddr;
     QHostAddress addr(sBaseAddress);
 
+    BaseAddr = sBaseAddress;
+
 #if !defined(QT_NO_IPV6)
     // Basically if it appears to be an IPv6 IP surround the IP with [] otherwise don't bother
-    if (( addr.protocol() == QAbstractSocket::IPv6Protocol ) || (sBaseAddress.contains(":")))
+    if (sBaseAddress.contains(":"))
         BaseAddr = "[" + sBaseAddress + "]";
     else
 #endif
-    if ( addr.protocol() == QAbstractSocket::IPv4Protocol )
-        BaseAddr = sBaseAddress;
 
     os << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
           "<root xmlns=\"urn:schemas-upnp-org:device-1-0\"  xmlns:mythtv=\"mythtv.org\">\n"