Skip to content

Commit

Permalink
refine readData function per selectable base-class change
Browse files Browse the repository at this point in the history
Signed-off-by: shine.chen <shine.chen@mediatek.com>
  • Loading branch information
shine.chen committed Oct 8, 2019
1 parent cae6a7b commit 1ae525a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mclagsyncd/mclaglink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ int MclagLink::getFd()
return m_connection_socket;
}

void MclagLink::readData()
uint64_t MclagLink::readData()
{
mclag_msg_hdr_t *hdr = NULL;
size_t msg_len = 0;
Expand Down Expand Up @@ -715,6 +715,7 @@ void MclagLink::readData()

memmove(m_messageBuffer, m_messageBuffer + start, m_pos - start);
m_pos = m_pos - (uint32_t)start;
return;

return 0;
}

2 changes: 1 addition & 1 deletion mclagsyncd/mclaglink.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class MclagLink : public Selectable {
void accept();

int getFd() override;
void readData() override;
uint64_t readData() override;

/* readMe throws MclagConnectionClosedException when connection is lost */
class MclagConnectionClosedException : public std::exception
Expand Down

0 comments on commit 1ae525a

Please sign in to comment.