aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-15 18:10:27 +0100
committerMax Kellermann <max@duempel.org>2013-01-15 18:16:15 +0100
commit1c7ee737e65a553c5e0d7dc7fc29a42b70d43f1a (patch)
tree34db512347e29ceb2147ba5d8018dcde17fb02b8
parent39439b80f5d1574e67f337a047869cf067c396b7 (diff)
downloadmpd-1c7ee737e65a553c5e0d7dc7fc29a42b70d43f1a.tar.gz
mpd-1c7ee737e65a553c5e0d7dc7fc29a42b70d43f1a.tar.xz
mpd-1c7ee737e65a553c5e0d7dc7fc29a42b70d43f1a.zip
input/Curl: don't remove/add modified GPollFD
Not necessary, GLib will pick up the updated GPollFD automatically.
-rw-r--r--src/input/CurlInputPlugin.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx
index 27662d871..ef0e350f8 100644
--- a/src/input/CurlInputPlugin.cxx
+++ b/src/input/CurlInputPlugin.cxx
@@ -325,18 +325,11 @@ curl_update_fds(void)
gushort events = input_curl_fd_events(poll_fd->fd, &rfds,
&wfds, &efds);
-
- if (events != poll_fd->events)
- g_source_remove_poll(curl.source, poll_fd);
-
if (events != 0) {
- if (events != poll_fd->events) {
- poll_fd->events = events;
- g_source_add_poll(curl.source, poll_fd);
- }
-
+ poll_fd->events = events;
prev = i;
} else {
+ g_source_remove_poll(curl.source, poll_fd);
curl.fds.erase_after(prev);
}
}