From 9049b6d9373a3fc63dac7eab2efc566376295dbd Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Sun, 19 Jun 2016 12:49:44 +0200 Subject: [PATCH] fix aliases cleanup --- api/aliases.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/aliases.go b/api/aliases.go index b8d1fc3..0b9900b 100644 --- a/api/aliases.go +++ b/api/aliases.go @@ -35,11 +35,12 @@ func (api *ApiAliases) cleaner() { //counter for the diffrent attribute count := 0 if nodeinfo := node.Nodeinfo; nodeinfo != nil { - count += 3 + count += 1 if alias.Hostname == nodeinfo.Hostname { count -= 1 } if alias.Location != nil && nodeinfo.Location != nil { + count += 2 if alias.Location.Latitude == nodeinfo.Location.Latitude { count -= 1 }