From 9bf515fd0cb7e6934161669964b0948815d2c244 Mon Sep 17 00:00:00 2001 From: Nick Hingston Date: Wed, 25 Jan 2017 14:07:17 +0000 Subject: [PATCH] Convert local IPv6 addresses back to IPv4 - otherwise PLT_Service instances don't get their callback (e.g. vol/mute changes on RenderingControl service) --- Source/Core/NptUri.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Core/NptUri.cpp b/Source/Core/NptUri.cpp index e4a7c3bd..acc5a426 100644 --- a/Source/Core/NptUri.cpp +++ b/Source/Core/NptUri.cpp @@ -619,7 +619,12 @@ NPT_Url::NPT_Url(const char* scheme, m_Fragment(fragment) { SetScheme(scheme); - + + // Convert local IPv6 addresses back to IPv4 - otherwise PLT_Services don't get their callback + if (m_Host.StartsWith("::ffff:")) { + m_Host = m_Host.SubString(7,m_Host.GetLength()-7); + } + // deal with IPv6 addresses if (m_Host.StartsWith("[") && m_Host.EndsWith("]")) { m_HostIsIpv6Address = true;