This commit is contained in:
aozhiwei 2020-05-22 16:11:24 +08:00
parent 8329259ad1
commit 15ab670d4a

View File

@ -5,6 +5,7 @@
#include <a8/udplog.h>
#include <a8/mysql.h>
#include <a8/openssl.h>
#include <a8/strutils.h>
#include <google/protobuf/message.h>
@ -351,13 +352,14 @@ namespace f8
bool IsOnlineEnv()
{
return !getenv("SERVER_ENV");
static bool is_online = !getenv("SERVER_ENV");
return is_online;
}
bool IsTestEnv()
{
char* env = getenv("SERVER_ENV");
return std::string(env) == "TEST";
static bool is_test = a8::SafeStrCmp(getenv("SERVER_ENV"), "TEST") == 0;
return is_test;
}
bool IsValidNormalConfig(a8::XObject& conf, std::vector<std::string> fields)