Skip to content

Commit

Permalink
Merge PR #747: go-E: Disable unsupported IPv6 discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Nov 25, 2024
2 parents cd62f88 + 7763c38 commit a5c71fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion goecharger/goediscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void GoeDiscovery::onServiceEntryAdded(const ZeroConfServiceEntry &serviceEntry)
// which spoof the mac address and multipe IP have the same mac address. Using zeroconf and have IP based discovery
// solves this issue

if (isGoeCharger(serviceEntry)) {
if (isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
qCDebug(dcGoECharger()) << "Discovery: Found ZeroConf go-eCharger" << serviceEntry;

GoeDiscovery::Result result;
Expand Down
5 changes: 2 additions & 3 deletions goecharger/integrationplugingoecharger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ QHostAddress IntegrationPluginGoECharger::getHostAddress(Thing *thing)
return m_monitors.value(thing)->networkDeviceInfo().address();

foreach (const ZeroConfServiceEntry &serviceEntry, m_serviceBrowser->serviceEntries()) {
if (GoeDiscovery::isGoeCharger(serviceEntry)) {
if (GoeDiscovery::isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
QString serial = serviceEntry.txt("serial");
if (thing->paramValue(goeHomeThingSerialNumberParamTypeId).toString() == serial) {
return serviceEntry.hostAddress();
Expand Down Expand Up @@ -1619,9 +1619,8 @@ void IntegrationPluginGoECharger::onConfigValueChanged(const ParamTypeId &paramT

void IntegrationPluginGoECharger::onServiceEntryAdded(const ZeroConfServiceEntry &serviceEntry)
{
if (GoeDiscovery::isGoeCharger(serviceEntry)) {
if (GoeDiscovery::isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
qCDebug(dcGoECharger()) << "Found ZeroConf go-eCharger:" << serviceEntry;

}
}

Expand Down

0 comments on commit a5c71fe

Please sign in to comment.