From 0ddaba3b9bd6ee7c032a342b956d8aa358eb0a42 Mon Sep 17 00:00:00 2001 From: Renuka Manavalan <47282725+renukamanavalan@users.noreply.github.com> Date: Thu, 19 Sep 2019 12:51:38 -0700 Subject: [PATCH] Adopt to signature change of Selectable::readData, which switched (#1061) return type from void to uint64_t. --- fpmsyncd/fpmlink.cpp | 3 ++- fpmsyncd/fpmlink.h | 2 +- orchagent/orch.h | 2 +- teamsyncd/teamsync.cpp | 3 ++- teamsyncd/teamsync.h | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fpmsyncd/fpmlink.cpp b/fpmsyncd/fpmlink.cpp index bed95b1dd46c..464f96522175 100644 --- a/fpmsyncd/fpmlink.cpp +++ b/fpmsyncd/fpmlink.cpp @@ -89,7 +89,7 @@ int FpmLink::getFd() return m_connection_socket; } -void FpmLink::readData() +uint64_t FpmLink::readData() { fpm_msg_hdr_t *hdr; size_t msg_len; @@ -133,4 +133,5 @@ void FpmLink::readData() memmove(m_messageBuffer, m_messageBuffer + start, m_pos - start); m_pos = m_pos - (uint32_t)start; + return 0; } diff --git a/fpmsyncd/fpmlink.h b/fpmsyncd/fpmlink.h index 7cd0635ed121..8ef570589f86 100644 --- a/fpmsyncd/fpmlink.h +++ b/fpmsyncd/fpmlink.h @@ -26,7 +26,7 @@ class FpmLink : public Selectable { void accept(); int getFd() override; - void readData() override; + uint64_t readData() override; /* readMe throws FpmConnectionClosedException when connection is lost */ class FpmConnectionClosedException : public std::exception { diff --git a/orchagent/orch.h b/orchagent/orch.h index f89f936ec696..0298770f2fac 100644 --- a/orchagent/orch.h +++ b/orchagent/orch.h @@ -82,7 +82,7 @@ class Executor : public Selectable // Decorating Selectable int getFd() override { return m_selectable->getFd(); } - void readData() override { m_selectable->readData(); } + uint64_t readData() override { return m_selectable->readData(); } bool hasCachedData() override { return m_selectable->hasCachedData(); } bool initializedWithData() override { return m_selectable->initializedWithData(); } void updateAfterRead() override { m_selectable->updateAfterRead(); } diff --git a/teamsyncd/teamsync.cpp b/teamsyncd/teamsync.cpp index bf3a1345f2da..d6f9555667eb 100644 --- a/teamsyncd/teamsync.cpp +++ b/teamsyncd/teamsync.cpp @@ -316,7 +316,8 @@ int TeamSync::TeamPortSync::getFd() return team_get_event_fd(m_team); } -void TeamSync::TeamPortSync::readData() +uint64_t TeamSync::TeamPortSync::readData() { team_handle_events(m_team); + return 0; } diff --git a/teamsyncd/teamsync.h b/teamsyncd/teamsync.h index 952dc8d4f3da..f47049d1a686 100644 --- a/teamsyncd/teamsync.h +++ b/teamsyncd/teamsync.h @@ -38,7 +38,7 @@ class TeamSync : public NetMsg ~TeamPortSync(); int getFd() override; - void readData() override; + uint64_t readData() override; /* member_name -> enabled|disabled */ std::map m_lagMembers;