mirror of https://github.com/aria2/aria2
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fix epoll error on the old kernel 2.6.8 or ealier. * src/EpollEventPoll.ccpull/1/head
parent
56366759fc
commit
cf20e207d4
|
@ -1,3 +1,8 @@
|
|||
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fix epoll error on the old kernel 2.6.8 or ealier.
|
||||
* src/EpollEventPoll.cc
|
||||
|
||||
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Use Util::parseLLInt instead of sscanf for portability. The
|
||||
|
|
|
@ -474,7 +474,10 @@ bool EpollEventPoll::deleteEvents(sock_t socket,
|
|||
|
||||
int r = 0;
|
||||
if((*i)->eventEmpty()) {
|
||||
r = epoll_ctl(_epfd, EPOLL_CTL_DEL, (*i)->getSocket(), 0);
|
||||
// In kernel before 2.6.9, epoll_ctl with EPOLL_CTL_DEL requires non-null
|
||||
// pointer of epoll_event.
|
||||
struct epoll_event ev = {0,{0}};
|
||||
r = epoll_ctl(_epfd, EPOLL_CTL_DEL, (*i)->getSocket(), &ev);
|
||||
_socketEntries.erase(i);
|
||||
} else {
|
||||
// If socket is closed, then it seems it is automatically removed from
|
||||
|
|
Loading…
Reference in New Issue