summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager_test.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-10 20:12:25 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-14 00:44:15 +0900
commit2ef757bc5f71d4131910d0973ffd7026cca73f9f (patch)
tree004801d58a78bcef11892bb144bff870ead7c291 /table/table_manager_test.go
parent7d68855c86daa8fa8202f5cbdf585d9d8c1d3d21 (diff)
table: remove Destination's oldKnownPathList
Withdrawn pathes are kept to be referenced thus the memory for them are not freed. Kill oldKnownPathList and Destination's NewFeed(). Destination's Calculate() returns the best paths. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager_test.go')
-rw-r--r--table/table_manager_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/table/table_manager_test.go b/table/table_manager_test.go
index becf69a1..4732d3a3 100644
--- a/table/table_manager_test.go
+++ b/table/table_manager_test.go
@@ -30,10 +30,9 @@ import (
// this function processes only BGPUpdate
func (manager *TableManager) ProcessUpdate(fromPeer *PeerInfo, message *bgp.BGPMessage) ([]*Path, error) {
paths := ProcessMessage(message, fromPeer, time.Now())
- dsts, _, _ := manager.ProcessPaths(paths)
+ best, _, _ := manager.ProcessPaths([]string{GLOBAL_RIB_NAME}, paths)
paths2 := make([]*Path, 0, len(paths))
- for _, dst := range dsts {
- p := dst.NewFeed(GLOBAL_RIB_NAME)
+ for _, p := range best[GLOBAL_RIB_NAME] {
if p != nil {
paths2 = append(paths2, p)
}