Skip to content

Commit

Permalink
Fix BM homebrew compatibility (rptrid comparison)
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
martinhpedersen committed Apr 23, 2019
1 parent eacc755 commit 9f086ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homebrew/homebrew.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9f086ae

Please sign in to comment.