Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
856b0e68
Commit
856b0e68
authored
Sep 16, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/curl: remove _schedule_update()
Call _update_fds() directly. This is possible because it's only called from within the I/O thread.
parent
bf1eb46b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
48 deletions
+1
-48
curl_input_plugin.c
src/input/curl_input_plugin.c
+1
-48
No files found.
src/input/curl_input_plugin.c
View file @
856b0e68
...
@@ -147,11 +147,6 @@ static struct {
...
@@ -147,11 +147,6 @@ static struct {
GSList
*
fds
;
GSList
*
fds
;
/**
* When this is non-zero, then an update of #fds is scheduled.
*/
guint
dirty_source_id
;
#if LIBCURL_VERSION_NUM >= 0x070f04
#if LIBCURL_VERSION_NUM >= 0x070f04
/**
/**
* Did CURL give us a timeout? If yes, then we need to call
* Did CURL give us a timeout? If yes, then we need to call
...
@@ -305,38 +300,6 @@ curl_update_fds(void)
...
@@ -305,38 +300,6 @@ curl_update_fds(void)
}
}
/**
/**
* Callback for curl_schedule_update() that runs in the I/O thread.
*/
static
gboolean
input_curl_dirty_callback
(
G_GNUC_UNUSED
gpointer
data
)
{
assert
(
io_thread_inside
());
assert
(
curl
.
dirty_source_id
!=
0
||
curl
.
requests
==
NULL
);
curl
.
dirty_source_id
=
0
;
curl_update_fds
();
return
false
;
}
/**
* Schedule a refresh of curl.fds. Does nothing if that is already
* scheduled.
*
* No lock needed.
*/
static
void
input_curl_schedule_update
(
void
)
{
if
(
curl
.
dirty_source_id
!=
0
)
/* already scheduled */
return
;
curl
.
dirty_source_id
=
io_thread_idle_add
(
input_curl_dirty_callback
,
NULL
);
}
/**
* Runs in the I/O thread. No lock needed.
* Runs in the I/O thread. No lock needed.
*/
*/
static
bool
static
bool
...
@@ -357,7 +320,7 @@ input_curl_easy_add(struct input_curl *c, GError **error_r)
...
@@ -357,7 +320,7 @@ input_curl_easy_add(struct input_curl *c, GError **error_r)
return
false
;
return
false
;
}
}
input_curl_schedule_update
();
curl_update_fds
();
return
true
;
return
true
;
}
}
...
@@ -721,16 +684,6 @@ curl_destroy_sources(G_GNUC_UNUSED gpointer data)
...
@@ -721,16 +684,6 @@ curl_destroy_sources(G_GNUC_UNUSED gpointer data)
{
{
g_source_destroy
(
curl
.
source
);
g_source_destroy
(
curl
.
source
);
if
(
curl
.
dirty_source_id
!=
0
)
{
GSource
*
source
=
g_main_context_find_source_by_id
(
io_thread_context
(),
curl
.
dirty_source_id
);
assert
(
source
!=
NULL
);
curl
.
dirty_source_id
=
0
;
g_source_destroy
(
source
);
}
return
NULL
;
return
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment