Skip to content

Commit d5ff662

Browse files
authored
Check if serial key is same after checking for exiry (symless#36)
Refactor license key handling to check for changes after license assignment
1 parent fd942ba commit d5ff662

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/synergy/gui/license/LicenseHandler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,6 @@ LicenseHandler::setLicense(const QString &hexString, bool allowExpired) {
252252
return kInvalid;
253253
}
254254

255-
if (serialKey == m_license.serialKey()) {
256-
qDebug("serial key did not change, ignoring");
257-
return kUnchanged;
258-
}
259-
260255
auto license = License(serialKey);
261256
if (m_time.hasTestTime()) {
262257
license.setNowFunc([this]() { return m_time.now(); });
@@ -280,6 +275,11 @@ LicenseHandler::setLicense(const QString &hexString, bool allowExpired) {
280275
}
281276
}
282277

278+
if (serialKey == m_license.serialKey()) {
279+
qDebug("serial key did not change, ignoring");
280+
return kUnchanged;
281+
}
282+
283283
return kSuccess;
284284
}
285285

0 commit comments

Comments
 (0)