aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 08:18:50 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 09:27:15 +0200
commit2bf3bc3e10662f1b27af0b2a702b1a8131535cd4 (patch)
tree9411ceaf335d2fadf1b849c110352734dc1f175c /src/input
parent28143f86f979bb81e2daf7847b7d5c8dc6ff9886 (diff)
downloadmpd-2bf3bc3e10662f1b27af0b2a702b1a8131535cd4.tar.gz
mpd-2bf3bc3e10662f1b27af0b2a702b1a8131535cd4.tar.xz
mpd-2bf3bc3e10662f1b27af0b2a702b1a8131535cd4.zip
input/curl: add assertions on io_thread_inside()
Diffstat (limited to 'src/input')
-rw-r--r--src/input/curl_input_plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index d06125f94..0aee4a044 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -245,6 +245,8 @@ input_curl_fd_events(int fd, fd_set *rfds, fd_set *wfds, fd_set *efds)
static void
curl_update_fds(void)
{
+ assert(io_thread_inside());
+
fd_set rfds, wfds, efds;
FD_ZERO(&rfds);
@@ -305,6 +307,7 @@ curl_update_fds(void)
static gboolean
input_curl_dirty_callback(G_GNUC_UNUSED gpointer data)
{
+ assert(io_thread_inside());
g_static_mutex_lock(&curl.mutex);
assert(curl.dirty_source_id != 0 || curl.requests == NULL);
@@ -420,6 +423,7 @@ input_curl_easy_free_indirect(struct input_curl *c)
static void
input_curl_abort_all_requests(GError *error)
{
+ assert(io_thread_inside());
assert(error != NULL);
while (curl.requests != NULL) {
@@ -443,6 +447,7 @@ input_curl_abort_all_requests(GError *error)
static void
input_curl_request_done(struct input_curl *c, CURLcode result, long status)
{
+ assert(io_thread_inside());
assert(c != NULL);
assert(c->easy == NULL);
assert(c->base.ready);
@@ -482,6 +487,8 @@ input_curl_handle_done(CURL *easy_handle, CURLcode result)
static void
input_curl_info_read(void)
{
+ assert(io_thread_inside());
+
CURLMsg *msg;
int msgs_in_queue;
@@ -500,6 +507,8 @@ input_curl_info_read(void)
static bool
input_curl_perform(void)
{
+ assert(io_thread_inside());
+
CURLMcode mcode;
do {