Balance DestinationId now take multiple destinations

This commit is contained in:
Radu Ioan Fericean
2015-05-16 00:01:30 +03:00
parent 1e5e025cc3
commit d2b4df69ca
26 changed files with 387 additions and 335 deletions

View File

@@ -79,7 +79,7 @@ func (uc *UnitsCounter) addUnits(amount float64, prefix string) {
for _, p := range utils.SplitPrefix(prefix, MIN_PREFIX_MATCH) {
if x, err := cache2go.GetCached(DESTINATION_PREFIX + p); err == nil {
destIds := x.(map[interface{}]struct{})
if _, found := destIds[mb.DestinationId]; found {
if _, found := destIds[mb.DestinationIds]; found {
mb.Value += amount
counted = true
break