Skip to content

Commit

Permalink
Fix issue with initialization of StateMachine::hold_time_
Browse files Browse the repository at this point in the history
StateMachine::hold_time_ is initialized from the BgpPeer's configured
hold time. However the BgpPeer's hold_time_ is yet not initialzed when
StateMachine is constructed.

Change-Id: I63b6b683b7c886f08ffbb80da7d25bc46996026b
Closes-Bug: 1518047
  • Loading branch information
Nischal Sheth committed Jan 12, 2016
1 parent b983f69 commit c3dbafd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bgp/bgp_peer.cc
Expand Up @@ -362,7 +362,6 @@ BgpPeer::BgpPeer(BgpServer *server, RoutingInstance *instance,
admin_down_(config->admin_down()),
passive_(config->passive()),
resolve_paths_(config->router_type() == "bgpaas-client"),
state_machine_(BgpObjectFactory::Create<StateMachine>(this)),
membership_req_pending_(0),
defer_close_(false),
vpn_tables_registered_(false),
Expand All @@ -376,6 +375,7 @@ BgpPeer::BgpPeer(BgpServer *server, RoutingInstance *instance,
policy_((config->peer_as() == config->local_as()) ?
BgpProto::IBGP : BgpProto::EBGP,
RibExportPolicy::BGP, config->peer_as(), -1, 0),
state_machine_(BgpObjectFactory::Create<StateMachine>(this)),
peer_close_(new PeerClose(this)),
peer_stats_(new PeerStats(this)),
deleter_(new DeleteActor(this)),
Expand Down
2 changes: 1 addition & 1 deletion src/bgp/bgp_peer.h
Expand Up @@ -383,7 +383,6 @@ class BgpPeer : public IPeer {
bool passive_;
bool resolve_paths_;

boost::scoped_ptr<StateMachine> state_machine_;
uint64_t membership_req_pending_;
bool defer_close_;
bool vpn_tables_registered_;
Expand All @@ -398,6 +397,7 @@ class BgpPeer : public IPeer {
std::vector<std::string> negotiated_families_;
BgpProto::BgpPeerType peer_type_;
RibExportPolicy policy_;
boost::scoped_ptr<StateMachine> state_machine_;
boost::scoped_ptr<PeerClose> peer_close_;
boost::scoped_ptr<PeerStats> peer_stats_;
boost::scoped_ptr<DeleteActor> deleter_;
Expand Down

0 comments on commit c3dbafd

Please sign in to comment.