I was expecting this to be the right thing, but was not sure because previously the flags were hardcoded, so I thought I might be missing some special case or something, but definitely spotted mode argument being unused which led to suspicion.
Mateusz On Wed, Mar 31, 2010 at 11:02 AM, Doug Judd <[email protected]> wrote: > Thanks for catching this one as well. The fix is to set the m_poll_interest > to the 'mode' argument and set the events field based on the 'mode' argument > as well. > - Doug > > On Mon, Mar 29, 2010 at 11:48 PM, Mateusz Berezecki <[email protected]> > wrote: >> >> Here's another one for IOHandler.h >> >> but this time it's highly speculative on my side, as I'm just doing it >> by reading code --- not running it. >> >> This part does not use mode argument and sets OUT / IN polling but >> adds IN only to poll interest member variable. >> >> Mateusz >> >> diff --git a/src/cc/AsyncComm/IOHandler.h b/src/cc/AsyncComm/IOHandler.h >> index c4bbc2a..6be95d4 100644 >> --- a/src/cc/AsyncComm/IOHandler.h >> +++ b/src/cc/AsyncComm/IOHandler.h >> @@ -134,7 +134,7 @@ namespace Hypertable { >> memset(&event, 0, sizeof(struct epoll_event)); >> event.data.ptr = this; >> if (ReactorFactory::ms_epollet) { >> - m_poll_interest |= Reactor::READ_READY; >> + m_poll_interest |= Reactor::READ_READY | Reactor::WRITE_READY; >> event.events = EPOLLIN | EPOLLOUT | POLLRDHUP | EPOLLET; >> if (epoll_ctl(m_reactor_ptr->poll_fd, EPOLL_CTL_ADD, m_sd, >> &event) < 0) { >> HT_ERRORF("epoll_ctl(%d, EPOLL_CTL_ADD, %d, EPOLLIN|EPOLLOUT|" >> >> >> >> On Mon, Mar 29, 2010 at 11:34 PM, Mateusz Berezecki <[email protected]> >> wrote: >> > Hi, >> > >> > I'm doing minor code reviews and here's the patch for IOHandler.cc >> > >> > diff --git a/src/cc/AsyncComm/IOHandler.cc >> > b/src/cc/AsyncComm/IOHandler.cc >> > index 19d95e1..8e6dde1 100644 >> > --- a/src/cc/AsyncComm/IOHandler.cc >> > +++ b/src/cc/AsyncComm/IOHandler.cc >> > @@ -195,7 +195,7 @@ int IOHandler::add_poll_interest(int mode) { >> > int IOHandler::remove_poll_interest(int mode) { >> > >> > if ((m_poll_interest & mode) == 0) >> > - return; >> > + return Error::OK; >> > >> > m_poll_interest &= ~mode; >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Hypertable Development" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/hypertable-dev?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Hypertable Development" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/hypertable-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Hypertable Development" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hypertable-dev?hl=en.
