mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-05 21:02:39 +08:00
#5657 Only check trial times when using a trial
This commit is contained in:
@@ -59,8 +59,10 @@ SerialKey::isExpiring(time_t currentTime) const
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (m_warnTime <= currentTime && currentTime < m_expireTime) {
|
||||
result = true;
|
||||
if (m_trial) {
|
||||
if (m_warnTime <= currentTime && currentTime < m_expireTime) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -71,11 +73,12 @@ SerialKey::isExpired(time_t currentTime) const
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (m_expireTime <= currentTime) {
|
||||
result = true;
|
||||
if (m_trial) {
|
||||
if (m_expireTime <= currentTime) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user