From d5f59c944e203319311069e25cf5254b279bc9f4 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Fri, 30 Apr 2021 10:45:32 +0200 Subject: [PATCH 1/2] removed force to local time by time desync --- decoder/decoder.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/decoder/decoder.go b/decoder/decoder.go index 8cdd8da0..309e31df 100644 --- a/decoder/decoder.go +++ b/decoder/decoder.go @@ -113,12 +113,10 @@ func (h *HEP) parse(packet []byte) error { } } - t := time.Now() h.Timestamp = time.Unix(int64(h.Tsec), int64(h.Tmsec*1000)) - d := t.Sub(h.Timestamp) - if d < 0 || (h.Tsec == 0 && h.Tmsec == 0) { - logp.Debug("hep", "got timestamp in the future with delta: %d from nodeID %d", d, h.NodeID) - h.Timestamp = t + if h.Tsec == 0 && h.Tmsec == 0 { + logp.Debug("hep", "got null timestamp from nodeID %d", h.NodeID) + h.Timestamp = time.Now() } h.normPayload() @@ -138,7 +136,7 @@ func (h *HEP) parse(packet []byte) error { if m == h.SIP.CseqMethod { lb := len(h.SIP.Body) h.SIP.Body = strings.Repeat("x", lb) - h.Payload = h.Payload[:len(h.Payload) - lb] + h.SIP.Body + h.Payload = h.Payload[:len(h.Payload)-lb] + h.SIP.Body } } From 0325bf58662f05b8c35a4599e9a3726bc79afc01 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Fri, 30 Apr 2021 10:59:57 +0200 Subject: [PATCH 2/2] increased version to 1.55 --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 3d6b029a..f8fdc9d2 100644 --- a/config/config.go +++ b/config/config.go @@ -1,6 +1,6 @@ package config -const Version = "heplify-server 1.54" +const Version = "heplify-server 1.55" var Setting HeplifyServer