mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
small fixes
This commit is contained in:
@@ -50,9 +50,9 @@ func (d *Destination) containsPrefix(prefix string) int {
|
||||
}
|
||||
}
|
||||
if d.longPrefixesMap != nil {
|
||||
for i, p := range utils.SplitPrefix(prefix) {
|
||||
for _, p := range utils.SplitPrefix(prefix) {
|
||||
if _, found := d.longPrefixesMap[p]; found {
|
||||
return len(prefix) - i
|
||||
return len(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,6 +253,8 @@ func (rs *RedisStorage) GetDestination(key string, checkDb bool) (dest *Destinat
|
||||
}
|
||||
dest.OptimizePrefixes()
|
||||
cache2go.Cache(key, dest)
|
||||
} else {
|
||||
return nil, errors.New("not found")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user