aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/Loop.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-06 18:20:51 +0100
committerMax Kellermann <max@duempel.org>2013-11-06 19:05:45 +0100
commit154bdf0bca49f36f6ff8bc7f001634735ceb0b73 (patch)
treec9532d8726d34c12f2fb060873d8aef5ceb91e2b /src/event/Loop.cxx
parented436c6f0c5d3c3d8d4b89ffc74655c7b872f0c0 (diff)
downloadmpd-154bdf0bca49f36f6ff8bc7f001634735ceb0b73.tar.gz
mpd-154bdf0bca49f36f6ff8bc7f001634735ceb0b73.tar.xz
mpd-154bdf0bca49f36f6ff8bc7f001634735ceb0b73.zip
event/SocketMonitor: add method Abandon()
Diffstat (limited to 'src/event/Loop.cxx')
-rw-r--r--src/event/Loop.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx
index 665dfa500..5aa24aea2 100644
--- a/src/event/Loop.cxx
+++ b/src/event/Loop.cxx
@@ -58,13 +58,18 @@ EventLoop::Break()
AddCall([this]() { Break(); });
}
-bool
-EventLoop::RemoveFD(int _fd, SocketMonitor &m)
+void
+EventLoop::Abandon(SocketMonitor &m)
{
for (unsigned i = 0, n = n_events; i < n; ++i)
if (events[i].data.ptr == &m)
events[i].events = 0;
+}
+bool
+EventLoop::RemoveFD(int _fd, SocketMonitor &m)
+{
+ Abandon(m);
return epoll.Remove(_fd);
}