From d42165a5fd586600f550679ee7f17d20fcd18701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 8 Sep 2024 15:01:31 +0200 Subject: [PATCH] fix structs alignment. --- server/internal/http/legacy/message/messages.go | 2 +- server/pkg/types/capture.go | 7 ++++--- server/pkg/types/message/messages.go | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/internal/http/legacy/message/messages.go b/server/internal/http/legacy/message/messages.go index de5cdc79..83921e66 100644 --- a/server/internal/http/legacy/message/messages.go +++ b/server/internal/http/legacy/message/messages.go @@ -12,8 +12,8 @@ type Message struct { type SystemInit struct { Event string `json:"event"` - ImplicitHosting bool `json:"implicit_hosting"` Locks map[string]string `json:"locks"` + ImplicitHosting bool `json:"implicit_hosting"` FileTransfer bool `json:"file_transfer"` } diff --git a/server/pkg/types/capture.go b/server/pkg/types/capture.go index 3390b239..4c90267b 100644 --- a/server/pkg/types/capture.go +++ b/server/pkg/types/capture.go @@ -18,14 +18,15 @@ var ( ) type Sample struct { - // buffer with encoded media - Data []byte - Length int // timing information Timestamp time.Time Duration time.Duration // metadata DeltaUnit bool // this unit cannot be decoded independently. + // buffer length + Length int + // buffer with encoded media + Data []byte } type SampleListener interface { diff --git a/server/pkg/types/message/messages.go b/server/pkg/types/message/messages.go index af08e072..1d6a2698 100644 --- a/server/pkg/types/message/messages.go +++ b/server/pkg/types/message/messages.go @@ -147,9 +147,9 @@ type ControlKey struct { } type ControlTouch struct { - TouchId uint32 `json:"touch_id"` *ControlPos - Pressure uint8 `json:"pressure"` + TouchId uint32 `json:"touch_id"` + Pressure uint8 `json:"pressure"` } /////////////////////////////