From d045cdf59eb033ac7893bc2d65eab7f305648480 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Wed, 1 Jul 2015 14:30:21 +0900 Subject: [PATCH] server: use pointer --- server/peer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/peer.go b/server/peer.go index e1f5964f..56ce7e17 100644 --- a/server/peer.go +++ b/server/peer.go @@ -320,7 +320,7 @@ func (peer *Peer) setDistributePolicy(policyMap map[string]*policy.Policy) { } -func (peer *Peer) applyDistributePolicies(original table.Path) (bool, table.Path) { +func (peer *Peer) applyDistributePolicies(original *table.Path) (bool, *table.Path) { policies := peer.distPolicies var d Direction = POLICY_DIRECTION_DISTRIBUTE @@ -417,7 +417,7 @@ func (loc *LocalRib) applyPolicies(d Direction, original *table.Path) (bool, *ta return applyPolicy("Loc", loc.OwnerName(), d, policies, original) } -func applyPolicy(component, owner string, d Direction, policies []*policy.Policy, original table.Path) (bool, table.Path) { +func applyPolicy(component, owner string, d Direction, policies []*policy.Policy, original *table.Path) (bool, *table.Path) { var applied bool = true for _, pol := range policies { if result, action, newpath := pol.Apply(original); result {