update role error log info

This commit is contained in:
fatedier 2017-12-16 21:56:13 +08:00
parent d873df5ca8
commit 69f8b08ac0

View File

@ -638,7 +638,7 @@ func (cfg *StcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
if tmpStr == "server" || tmpStr == "visitor" { if tmpStr == "server" || tmpStr == "visitor" {
cfg.Role = tmpStr cfg.Role = tmpStr
} else { } else {
return fmt.Errorf("Parse conf error: incorrect role [%s]", tmpStr) return fmt.Errorf("Parse conf error: proxy [%s] incorrect role [%s]", name, tmpStr)
} }
cfg.Sk = section["sk"] cfg.Sk = section["sk"]
@ -730,7 +730,7 @@ func (cfg *XtcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
if tmpStr == "server" || tmpStr == "visitor" { if tmpStr == "server" || tmpStr == "visitor" {
cfg.Role = tmpStr cfg.Role = tmpStr
} else { } else {
return fmt.Errorf("Parse conf error: incorrect role [%s]", tmpStr) return fmt.Errorf("Parse conf error: proxy [%s] incorrect role [%s]", name, tmpStr)
} }
cfg.Sk = section["sk"] cfg.Sk = section["sk"]