From 9f086ae1821fc37552ef32487b8ddee740e63a6c Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Tue, 23 Apr 2019 17:26:09 +0200 Subject: [PATCH] Fix BM homebrew compatibility (rptrid comparison) BM switched from upper case to lower case hexadecimal representation in BrandMeister release 20190421-185653. The comparison must be case insensitive according to a member of the BM dev team (@cyanide-burnout) on Telegram: "it shoud check on case-insensetive way". --- homebrew/homebrew.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homebrew/homebrew.go b/homebrew/homebrew.go index 479c8ac..5a6f753 100644 --- a/homebrew/homebrew.go +++ b/homebrew/homebrew.go @@ -254,7 +254,8 @@ func (h *Homebrew) WriteToPeerWithID(b []byte, id uint32) error { } func (h *Homebrew) checkRepeaterID(id []byte) bool { - return id != nil && bytes.Equal(id, h.id) + // BrandMeister release 20190421-185653 switched from upper case to lower case hex digits + return id != nil && bytes.EqualFold(id, h.id) } func (h *Homebrew) getPeer(id uint32) *Peer {