fix for cached interfaces

This commit is contained in:
Radu Ioan Fericean
2015-11-24 21:07:25 +02:00
parent 27ef05fac8
commit 2a72e8a2fc

View File

@@ -245,8 +245,9 @@ func (am *AliasHandler) RemoveReverseAlias(attr AttrReverseAlias, reply *string)
defer am.mu.Unlock()
rKey := utils.REVERSE_ALIASES_PREFIX + attr.Alias + attr.Target + attr.Context
if x, err := cache2go.Get(rKey); err == nil {
existingKeys := x.(map[string]struct{})
for key := range existingKeys {
existingKeys := x.(map[interface{}]struct{})
for iKey := range existingKeys {
key := iKey.(string)
// get destination id
elems := strings.Split(key, utils.CONCATENATED_KEY_SEP)
if len(elems) > 0 {
@@ -281,9 +282,9 @@ func (am *AliasHandler) GetReverseAlias(attr AttrReverseAlias, result *map[strin
aliases := make(map[string][]*Alias)
rKey := utils.REVERSE_ALIASES_PREFIX + attr.Alias + attr.Target + attr.Context
if x, err := cache2go.Get(rKey); err == nil {
existingKeys := x.(map[string]struct{})
for key := range existingKeys {
existingKeys := x.(map[interface{}]struct{})
for iKey := range existingKeys {
key := iKey.(string)
// get destination id
elems := strings.Split(key, utils.CONCATENATED_KEY_SEP)
var destID string