diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-22 23:58:31 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-25 04:57:11 -0800 |
commit | cca91da0dfe70c2c32d5152b3a2cf76bfdb0f048 (patch) | |
tree | c651f896af8ae8a85a1e928bbc919b9eda4dd6b5 /server/server.go | |
parent | 4ad751b4f01a23af523ba6ea6b183bebb74be041 (diff) |
config: add go type of embeded enums defined in openconfig
these types are embeded enums of openconfig and were left uint32
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index 3471ee7e..3a3b70fe 100644 --- a/server/server.go +++ b/server/server.go @@ -910,8 +910,8 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg { switch e.MsgType { case FSM_MSG_STATE_CHANGE: nextState := e.MsgData.(bgp.FSMState) - oldState := bgp.FSMState(peer.conf.State.SessionState) - peer.conf.State.SessionState = uint32(nextState) + oldState := bgp.FSMState(peer.conf.State.SessionState.ToInt()) + peer.conf.State.SessionState = peer.conf.State.SessionState.FromInt(int(nextState)) peer.fsm.StateChange(nextState) if oldState == bgp.BGP_FSM_ESTABLISHED { |