Add option to build pro without license checks

Former-commit-id: 0713518d2f34559a06db31a9023228b91ce60af3
This commit is contained in:
John Sully 2020-03-01 22:16:25 -05:00
parent aff45e1cde
commit 87b36b00df
2 changed files with 7 additions and 0 deletions

View File

@ -108,6 +108,11 @@ ifeq ($(USE_JEMALLOC),no)
MALLOC=libc
endif
ifeq ($(NO_LICENSE_CHECK),yes)
CXXFLAGS+=-DNO_LICENSE_CHECK=1
endif
# Override default settings if possible
-include .make-settings

View File

@ -1103,6 +1103,7 @@ void serverLog(int level, const char *fmt, ...) {
static void checkTrialTimeout()
{
#ifndef NO_LICENSE_CHECK
if (cserver.license_key != nullptr && FValidKey(cserver.license_key, strlen(cserver.license_key)))
return;
time_t curtime = time(NULL);
@ -1118,6 +1119,7 @@ static void checkTrialTimeout()
{
serverLog(LL_WARNING, "Trial timeout in %ld:%02ld minutes", remaining/60, remaining % 60);
}
#endif
}
/* Log a fixed message without printf-alike capabilities, in a way that is