Updated checkConfigSanity

This commit is contained in:
Trial97
2019-10-28 18:42:08 +02:00
committed by Dan Christian Bogos
parent 3a1d781f78
commit 7f0f164a14

View File

@@ -685,10 +685,10 @@ func (cfg *CGRConfig) checkConfigSanity() error {
}
}
// StorDB sanity checks
if self.storDbCfg.Type == utils.POSTGRES {
if cfg.storDbCfg.Type == utils.POSTGRES {
if !utils.IsSliceMember([]string{utils.PostgressSSLModeDisable, utils.PostgressSSLModeAllow,
utils.PostgressSSLModePrefer, utils.PostgressSSLModeRequire, utils.PostgressSSLModeVerifyCa,
utils.PostgressSSLModeVerifyFull}, self.storDbCfg.SSLMode) {
utils.PostgressSSLModeVerifyFull}, cfg.storDbCfg.SSLMode) {
return fmt.Errorf("<%s> Unsuported sslmode for storDB", utils.StorDB)
}
}