diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 10:57:00 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-10 11:52:31 +0200 |
commit | be0c8495cdb60847279ffbb6b6e1c1efed607e98 (patch) | |
tree | 8bac73de8f2cad0695ff819326e073f23c40e424 /src/input | |
parent | cbd0709d1cf8f7a33e57b3d1bb84d7fd527e2ff2 (diff) | |
download | mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.gz mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.xz mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.zip |
event/MultiSocketMonitor: PrepareSockets() returns timeout
Simplify the API, don't use GLib specific integer type.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/CurlInputPlugin.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index 8e29e47c7..56a42709a 100644 --- a/src/input/CurlInputPlugin.cxx +++ b/src/input/CurlInputPlugin.cxx @@ -204,7 +204,7 @@ public: private: void UpdateSockets(); - virtual void PrepareSockets(gcc_unused gint *timeout_r) override; + virtual int PrepareSockets() override; virtual bool CheckSockets() const override; virtual void DispatchSockets() override; }; @@ -536,8 +536,8 @@ input_curl_perform(void) return true; } -void -CurlSockets::PrepareSockets(gint *timeout_r) +int +CurlSockets::PrepareSockets() { UpdateSockets(); @@ -556,12 +556,13 @@ CurlSockets::PrepareSockets(gint *timeout_r) Let's use a lower limit of 10ms. */ timeout2 = 10; - *timeout_r = timeout2; - have_timeout = timeout2 >= 0; - } else + return timeout2; + } else { g_warning("curl_multi_timeout() failed: %s\n", curl_multi_strerror(mcode)); + return -1; + } } bool |