summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-25 01:02:28 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-25 01:02:28 -0800
commit037bc0169ca6e90cda1c52347c66d74198109a5c (patch)
tree7a1bd751e6e01bcef1109da9ce4ba3584a40bafa /table/destination.go
parentc0b90c40ae42fb0dc3088376a147ddfd5835519f (diff)
table: add MarshalJSON() to Path struct
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/destination.go')
-rw-r--r--table/destination.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/table/destination.go b/table/destination.go
index f2b4cafe..0d16a0db 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -121,6 +121,9 @@ func (dd *DestinationDefault) getBestPath() Path {
func (dd *DestinationDefault) setBestPath(path Path) {
dd.bestPath = path
+ if path != nil {
+ path.setBest(true)
+ }
}
func (dd *DestinationDefault) GetOldBestPath() Path {
@@ -129,6 +132,9 @@ func (dd *DestinationDefault) GetOldBestPath() Path {
func (dd *DestinationDefault) setOldBestPath(path Path) {
dd.oldBestPath = path
+ if path != nil {
+ path.setBest(false)
+ }
}
func (dd *DestinationDefault) getKnownPathList() []Path {