Skip to content

Commit

Permalink
Use correct timer to reschedule in BgpXmppChannel::EndOfRibSendTimerE…
Browse files Browse the repository at this point in the history
…xpired()

Also rename BgpXmppChannel::ResetEndOfRibState() to ResetEndOfRibSendState()

Change-Id: I0e4005c80ae5eb9cf7202a78d0817bd9c69f64d9
Closes-Bug: #1643058
  • Loading branch information
ananth-at-camphor-networks committed Nov 18, 2016
1 parent 233d009 commit dd25624
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/bgp/bgp_xmpp_channel.cc
Expand Up @@ -384,7 +384,7 @@ class BgpXmppChannel::XmppPeer : public IPeer {
send_ready_ = true;

// Restart EndOfRib Send timer if necessary.
parent_->ResetEndOfRibState();
parent_->ResetEndOfRibSendState();
}

BgpServer *server_;
Expand Down Expand Up @@ -1725,7 +1725,7 @@ bool BgpXmppChannel::MembershipResponseHandler(string table_name) {
channel_stats_.table_unsubscribe);

// Restart EndOfRib send if necessary.
ResetEndOfRibState();
ResetEndOfRibSendState();

// If Close manager is waiting to use membership, try now.
if (close_manager_->IsMembershipInWait())
Expand Down Expand Up @@ -2223,7 +2223,7 @@ bool BgpXmppChannel::EndOfRibSendTimerExpired() {
// seconds, delay EoR send event.
if (channel_->LastReceived(kEndOfRibSendRetryTimeMsecs * 3) ||
channel_->LastSent(kEndOfRibSendRetryTimeMsecs * 3)) {
eor_receive_timer_->Reschedule(kEndOfRibSendRetryTimeMsecs);
eor_send_timer_->Reschedule(kEndOfRibSendRetryTimeMsecs);
BGP_LOG_PEER(Message, Peer(), SandeshLevel::SYS_INFO,
BGP_LOG_FLAG_ALL, BGP_PEER_DIR_IN,
"EndOfRib Send timer rescheduled to fire after " <<
Expand Down Expand Up @@ -2251,7 +2251,7 @@ void BgpXmppChannel::StartEndOfRibReceiveTimer() {
boost::bind(&BgpXmppChannel::EndOfRibTimerErrorHandler, this, _1, _2));
}

void BgpXmppChannel::ResetEndOfRibState() {
void BgpXmppChannel::ResetEndOfRibSendState() {
if (eor_sent_)
return;

Expand Down Expand Up @@ -2558,7 +2558,7 @@ void BgpXmppChannelManager::XmppHandleChannelEvent(XmppChannel *channel,

bgp_xmpp_channel->eor_sent_ = false;
bgp_xmpp_channel->StartEndOfRibReceiveTimer();
bgp_xmpp_channel->ResetEndOfRibState();
bgp_xmpp_channel->ResetEndOfRibSendState();
} else if (state == xmps::NOT_READY) {
if (it != channel_map_.end()) {
bgp_xmpp_channel = (*it).second;
Expand Down
2 changes: 1 addition & 1 deletion src/bgp/bgp_xmpp_channel.h
Expand Up @@ -145,7 +145,7 @@ class BgpXmppChannel {
const XmppChannel *channel() const { return channel_; }
XmppChannel *channel() { return channel_; }
void StartEndOfRibReceiveTimer();
void ResetEndOfRibState();
void ResetEndOfRibSendState();
bool EndOfRibSendTimerExpired();
bool MembershipResponseHandler(std::string table_name);
Timer *eor_send_timer() const { return eor_send_timer_; }
Expand Down

0 comments on commit dd25624

Please sign in to comment.