From be0c8495cdb60847279ffbb6b6e1c1efed607e98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 10:57:00 +0200 Subject: event/MultiSocketMonitor: PrepareSockets() returns timeout Simplify the API, don't use GLib specific integer type. --- src/event/MultiSocketMonitor.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/event') diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx index 781fdeca6..50be18070 100644 --- a/src/event/MultiSocketMonitor.hxx +++ b/src/event/MultiSocketMonitor.hxx @@ -101,7 +101,10 @@ public: } protected: - virtual void PrepareSockets(gcc_unused gint *timeout_r) {} + /** + * @return timeout [ms] or -1 for no timeout + */ + virtual int PrepareSockets() = 0; virtual bool CheckSockets() const { return false; } virtual void DispatchSockets() = 0; @@ -114,7 +117,7 @@ public: private: bool Prepare(gint *timeout_r) { - PrepareSockets(timeout_r); + *timeout_r = PrepareSockets(); return false; } -- cgit v1.2.3