From e6b4e0f4edb9d501fabbc52ffbaac013b3748aba Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Mon, 16 May 2016 07:07:06 +0000 Subject: server: fix a bug in handleGrpcGetPolicyAssignment() Signed-off-by: ISHIDA Wataru --- server/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/server.go') diff --git a/server/server.go b/server/server.go index 9cfe3d56..ce18f2a2 100644 --- a/server/server.go +++ b/server/server.go @@ -2952,7 +2952,9 @@ func (server *BgpServer) handleGrpcGetPolicyAssignment(grpcReq *GrpcRequest) (*a if err != nil { return rsp, err } - rsp.Assignment.Default = server.policy.GetDefaultPolicy(id, dir).ToApiStruct() + rsp.Assignment = &api.PolicyAssignment{ + Default: server.policy.GetDefaultPolicy(id, dir).ToApiStruct(), + } ps := server.policy.GetPolicy(id, dir) rsp.Assignment.Policies = make([]*api.Policy, 0, len(ps)) for _, x := range ps { -- cgit v1.2.3