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 3efbde0 commit 592613a
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 @@ -387,7 +387,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 @@ -1869,7 +1869,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 @@ -2367,7 +2367,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 @@ -2395,7 +2395,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 @@ -2702,7 +2702,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 592613a

Please sign in to comment.