diff --git a/icsstat/icsstat.go b/icsstat/icsstat.go index 956391f..60fa1a0 100644 --- a/icsstat/icsstat.go +++ b/icsstat/icsstat.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "math/rand" + "os" "strings" "sync" "time" @@ -146,7 +147,7 @@ func ListenStatMNG1() (icserr *icserror.IcsError) { } func NewSidVal() { - conf := icsconf.GetIcsConfig() + // conf := icsconf.GetIcsConfig() timeN := time.Now() nano := fmt.Sprintf("%d", timeN.UTC().Nanosecond()) seq := fmt.Sprintf("%02d%02d%02d%03s", timeN.Hour(), timeN.Minute(), timeN.Second(), nano[:3]) @@ -155,8 +156,14 @@ func NewSidVal() { } gSeqVal.M = &sync.Mutex{} + hostname, err := os.Hostname() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + ghost = &Host{ - HostName: conf.InfoConfig.HostName, + HostName: hostname, } ghost.M = &sync.Mutex{} }