SYNERGY-970 Synergy1. User is not able to connect to server using ipv… (#7005)

* SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes
*Fix connection without brackets
*Fix config screen bug

* SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes
*Update changelog

Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
This commit is contained in:
Andrey Batyiev 2021-05-19 14:08:24 +03:00 committed by GitHub
parent a0b3f6a892
commit ee99c2bc99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions

View file

@ -15,6 +15,7 @@ Bug fixes:
- #6993 Fix issues with prefences UI
- #6992 UI issues and use cases
- #7000 Additional UI tweaks
- #7005 Fix User is not able to connect to server using ipv6 without wrapping IP in square quotes
Enhancements:
- #6954 Move language selection to advanced section

View file

@ -799,7 +799,19 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
}
#endif
}
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
QString hostName = m_pLineEditHostname->text();
// if interface is IPv6 - ensure that ip is in square brackets
if (hostName.count(':') > 1) {
if(hostName[0] != '[') {
hostName.insert(0, '[');
}
if(hostName[hostName.size() - 1] != ']') {
hostName.push_back(']');
}
}
args << hostName + ":" + QString::number(appConfig().port());
return true;
}

View file

@ -137,9 +137,9 @@ Config::removeScreen(const String& name)
m_nameToCanonicalName.erase(iter++);
}
else {
++index;
++iter;
}
}
}
}
void