diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-03-10 20:12:25 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-03-14 00:44:15 +0900 |
commit | 2ef757bc5f71d4131910d0973ffd7026cca73f9f (patch) | |
tree | 004801d58a78bcef11892bb144bff870ead7c291 /table/table_manager_test.go | |
parent | 7d68855c86daa8fa8202f5cbdf585d9d8c1d3d21 (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.go | 5 |
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) } |