diff --git a/scouterx/common/util/iputil.go b/scouterx/common/util/iputil.go index fb4a20e..449bedf 100644 --- a/scouterx/common/util/iputil.go +++ b/scouterx/common/util/iputil.go @@ -14,7 +14,7 @@ func IpToBytes(ip string) []byte { return emptyIp } for i, part := range split { - v, err := strconv.ParseInt(part, 10, 8) + v, err := strconv.ParseUint(part, 10, 8) if (err != nil || v < 0) { return emptyIp } diff --git a/scouterx/common/util/iputil_test.go b/scouterx/common/util/iputil_test.go new file mode 100644 index 0000000..3bfb79f --- /dev/null +++ b/scouterx/common/util/iputil_test.go @@ -0,0 +1,13 @@ +package util + +import ( + "testing" + + "fmt" +) + +func TestIpToBytes(t *testing.T) { + + bytes := IpToBytes("118.241.190.59") + fmt.Printf("bytes : %s \n",string(bytes)) +} diff --git a/scouterx/netio/dataproxy.go b/scouterx/netio/dataproxy.go index 4306b56..af79304 100644 --- a/scouterx/netio/dataproxy.go +++ b/scouterx/netio/dataproxy.go @@ -36,6 +36,7 @@ func ResetTextSent() { loginSent.Clear() descSent.Clear() stackElementSent.Clear() + hashMessageSent.Clear() } func reportScouterPanicFinal() { if r := recover(); r != nil { diff --git a/scouterx/netio/tcpclient/handlers.go b/scouterx/netio/tcpclient/handlers.go index a9fbace..e635a96 100644 --- a/scouterx/netio/tcpclient/handlers.go +++ b/scouterx/netio/tcpclient/handlers.go @@ -148,7 +148,7 @@ func handle(cmd string, pack netdata.Pack, in *netdata.DataInputX, out *netdata. return GetGoroutineDetail(pack) default: if ac.IsTrace() { - logger.Trace.Println("UNKNWON-HANDLER: " + cmd) + logger.Trace.Println("UNKNOWN-HANDLER: " + cmd) } }