From 40414f9295dd301f1c714bc3067392b7cc8f8427 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Tue, 7 Jun 2022 16:00:29 -0700 Subject: Fix hardcoded port in tracker registration --- hotline/tracker.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hotline/tracker.go') diff --git a/hotline/tracker.go b/hotline/tracker.go index 2fc6004..63fb279 100644 --- a/hotline/tracker.go +++ b/hotline/tracker.go @@ -12,11 +12,11 @@ import ( ) type TrackerRegistration struct { - Port []byte // Server listening port number - UserCount int // Number of users connected to this particular server - PassID []byte // Random number generated by the server - Name string // Server name - Description string // Description of the server + Port [2]byte // Server listening port number + UserCount int // Number of users connected to this particular server + PassID []byte // Random number generated by the server + Name string // Server name + Description string // Description of the server } func (tr *TrackerRegistration) Payload() []byte { @@ -25,7 +25,7 @@ func (tr *TrackerRegistration) Payload() []byte { return concat.Slices( []byte{0x00, 0x01}, - tr.Port, + tr.Port[:], userCount, []byte{0x00, 0x00}, tr.PassID, -- cgit