let role default value to 'server'

This commit is contained in:
fatedier 2017-12-15 11:40:08 +08:00
parent 92046a7ca2
commit d873df5ca8
1 changed files with 6 additions and 0 deletions

View File

@ -632,6 +632,9 @@ func (cfg *StcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
}
tmpStr := section["role"]
if tmpStr == "" {
tmpStr = "server"
}
if tmpStr == "server" || tmpStr == "visitor" {
cfg.Role = tmpStr
} else {
@ -721,6 +724,9 @@ func (cfg *XtcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
}
tmpStr := section["role"]
if tmpStr == "" {
tmpStr = "server"
}
if tmpStr == "server" || tmpStr == "visitor" {
cfg.Role = tmpStr
} else {