diff --git a/buildutils/travis_builder.sh b/buildutils/travis_builder.sh index a6b1331..e657257 100755 --- a/buildutils/travis_builder.sh +++ b/buildutils/travis_builder.sh @@ -39,7 +39,7 @@ func_usage() echo " -h print help" echo "Environments" echo " BUILD_NUMBER specify build number for packaging(default 1)" - echo " TRAVIS_TAG if the current build is for a git tag, this variable is set to the tag’s name" + echo " TRAVIS_TAG if the current build is for a git tag, this variable is set to the tag's name" echo " FORCE_BUILD_PKG if this env is 'true', force packaging anytime" echo " USE_PC_REPO if this env is 'true', use packagecloud.io repository" echo " CONFIGUREOPT specify extra configure option." diff --git a/lib/k2htpdtorman.cc b/lib/k2htpdtorman.cc index 2a79334..68b58e9 100644 --- a/lib/k2htpdtorman.cc +++ b/lib/k2htpdtorman.cc @@ -376,7 +376,7 @@ bool K2HtpDtorManager::ReadIniFileContents(const char* filepath, dtorstrlst_t& l return true; } -bool K2HtpDtorManager::LoadConfigration(const char* config, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) +bool K2HtpDtorManager::LoadConfiguration(const char* config, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) { // get configuration type without environment CHMCONFTYPE conftype = check_chmconf_type(config); @@ -387,14 +387,14 @@ bool K2HtpDtorManager::LoadConfigration(const char* config, string& chmpxconf, b bool result; if(CHMCONF_TYPE_INI_FILE == conftype){ - result = K2HtpDtorManager::LoadConfigrationIni(config, chmpxconf, isbroadcast, excepts, outputfile, excepttypes); + result = K2HtpDtorManager::LoadConfigurationIni(config, chmpxconf, isbroadcast, excepts, outputfile, excepttypes); }else{ - result = K2HtpDtorManager::LoadConfigrationYaml(config, chmpxconf, isbroadcast, excepts, outputfile, excepttypes, (CHMCONF_TYPE_JSON_STRING == conftype)); + result = K2HtpDtorManager::LoadConfigurationYaml(config, chmpxconf, isbroadcast, excepts, outputfile, excepttypes, (CHMCONF_TYPE_JSON_STRING == conftype)); } return result; } -bool K2HtpDtorManager::LoadConfigrationIni(const char* filepath, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) +bool K2HtpDtorManager::LoadConfigurationIni(const char* filepath, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) { // Load all file contents(with include file) dtorstrlst_t linelst; @@ -491,7 +491,7 @@ bool K2HtpDtorManager::LoadConfigrationIni(const char* filepath, string& chmpxco return true; } -bool K2HtpDtorManager::LoadConfigrationYaml(const char* config, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes, bool is_json_string) +bool K2HtpDtorManager::LoadConfigurationYaml(const char* config, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes, bool is_json_string) { // initialize yaml parser yaml_parser_t yparser; @@ -521,7 +521,7 @@ bool K2HtpDtorManager::LoadConfigrationYaml(const char* config, string& chmpxcon chmpxconf = config; // default isbroadcast = false; // default outputfile = ""; // default - bool result = K2HtpDtorManager::LoadConfigrationYamlTopLevel(yparser, chmpxconf, isbroadcast, excepts, outputfile, excepttypes); + bool result = K2HtpDtorManager::LoadConfigurationYamlTopLevel(yparser, chmpxconf, isbroadcast, excepts, outputfile, excepttypes); yaml_parser_delete(&yparser); if(fp){ @@ -530,7 +530,7 @@ bool K2HtpDtorManager::LoadConfigrationYaml(const char* config, string& chmpxcon return result; } -bool K2HtpDtorManager::LoadConfigrationYamlTopLevel(yaml_parser_t& yparser, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) +bool K2HtpDtorManager::LoadConfigurationYamlTopLevel(yaml_parser_t& yparser, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) { CHMYamlDataStack other_stack; bool is_set_dtor = false; @@ -730,7 +730,7 @@ bool K2HtpDtorManager::LoadConfigrationYamlTopLevel(yaml_parser_t& yparser, stri } }else{ // Load K2HTPDTOR section - if(!K2HtpDtorManager::LoadConfigrationYamlContents(yparser, chmpxconf, isbroadcast, excepts, outputfile, excepttypes)){ + if(!K2HtpDtorManager::LoadConfigurationYamlContents(yparser, chmpxconf, isbroadcast, excepts, outputfile, excepttypes)){ ERR_K2HPRN("Something error occured in loading %s section.", CFG_K2HTPDTOR_SEC_STR); result = false; } @@ -759,7 +759,7 @@ bool K2HtpDtorManager::LoadConfigrationYamlTopLevel(yaml_parser_t& yparser, stri return result; } -bool K2HtpDtorManager::LoadConfigrationYamlContents(yaml_parser_t& yparser, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) +bool K2HtpDtorManager::LoadConfigurationYamlContents(yaml_parser_t& yparser, string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, string& outputfile, excepttypemap_t& excepttypes) { // Must start yaml mapping event. yaml_event_t yevent; @@ -934,7 +934,7 @@ bool K2HtpDtorManager::Add(k2h_h k2hhandle, const char* pchmpxconf) bool isbroadcast = false; dtorpbylst_t excepts; excepttypemap_t excepttypes; - if(!K2HtpDtorManager::LoadConfigration(pchmpxconf, chmpxconf, isbroadcast, excepts, outputfile, excepttypes)){ + if(!K2HtpDtorManager::LoadConfiguration(pchmpxconf, chmpxconf, isbroadcast, excepts, outputfile, excepttypes)){ ERR_K2HPRN("Configuration file(%s) has something wrong.", pchmpxconf); return false; } diff --git a/lib/k2htpdtorman.h b/lib/k2htpdtorman.h index 9fda9d7..b6c10bb 100644 --- a/lib/k2htpdtorman.h +++ b/lib/k2htpdtorman.h @@ -150,11 +150,11 @@ class K2HtpDtorManager protected: static void* WorkerThread(void* param); static bool ReadIniFileContents(const char* filepath, dtorstrlst_t& linelst, dtorstrlst_t& allfiles); - static bool LoadConfigration(const char* filepath, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); - static bool LoadConfigrationIni(const char* filepath, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); - static bool LoadConfigrationYaml(const char* config, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes, bool is_json_string); - static bool LoadConfigrationYamlTopLevel(yaml_parser_t& yparser, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); - static bool LoadConfigrationYamlContents(yaml_parser_t& yparser, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); + static bool LoadConfiguration(const char* filepath, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); + static bool LoadConfigurationIni(const char* filepath, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); + static bool LoadConfigurationYaml(const char* config, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes, bool is_json_string); + static bool LoadConfigurationYamlTopLevel(yaml_parser_t& yparser, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); + static bool LoadConfigurationYamlContents(yaml_parser_t& yparser, std::string& chmpxconf, bool& isbroadcast, dtorpbylst_t& excepts, std::string& outputfile, excepttypemap_t& excepttypes); K2HtpDtorManager(); virtual ~K2HtpDtorManager(); diff --git a/src/k2htpdtorsvr.cc b/src/k2htpdtorsvr.cc index 02788f7..6c44b6e 100644 --- a/src/k2htpdtorsvr.cc +++ b/src/k2htpdtorsvr.cc @@ -223,7 +223,7 @@ int main(int argc, char** argv) // make and check info from conf file K2HTPDTORSVRINFO info; - if(!ParseK2htpdtorsvrConfigration(config.c_str(), &info)){ + if(!ParseK2htpdtorsvrConfiguration(config.c_str(), &info)){ ERR_K2HPRN("Something wrong in conf file(%s).", config.c_str()); exit(EXIT_FAILURE); } diff --git a/src/k2htpdtorsvrparser.cc b/src/k2htpdtorsvrparser.cc index acf4c29..2dd5956 100644 --- a/src/k2htpdtorsvrparser.cc +++ b/src/k2htpdtorsvrparser.cc @@ -785,7 +785,7 @@ static bool ParseK2htpdtorsvrYaml(const char* config, PK2HTPDTORSVRINFO pInfo, b return result; } -bool ParseK2htpdtorsvrConfigration(const char* config, PK2HTPDTORSVRINFO pInfo) +bool ParseK2htpdtorsvrConfiguration(const char* config, PK2HTPDTORSVRINFO pInfo) { // get configuration type without environment string normalize_config(""); diff --git a/src/k2htpdtorsvrparser.h b/src/k2htpdtorsvrparser.h index 65e975e..bc0dbbd 100644 --- a/src/k2htpdtorsvrparser.h +++ b/src/k2htpdtorsvrparser.h @@ -55,7 +55,7 @@ typedef struct k2htpdtorsvr_info{ //--------------------------------------------------------- // Utilities //--------------------------------------------------------- -bool ParseK2htpdtorsvrConfigration(const char* config, PK2HTPDTORSVRINFO pInfo); +bool ParseK2htpdtorsvrConfiguration(const char* config, PK2HTPDTORSVRINFO pInfo); #endif // K2HTPDTORSVRPARSER_H