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
d6247902
Commit
d6247902
authored
Nov 23, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/curl: work around stream resume bug (fixed in libcurl 7.32.0)
parent
a566c28a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
NEWS
NEWS
+2
-0
CurlInputPlugin.cxx
src/input/CurlInputPlugin.cxx
+17
-0
No files found.
NEWS
View file @
d6247902
...
...
@@ -5,6 +5,8 @@ ver 0.18.5 (20??/??/??)
* database
- proxy: auto-reload statistics
- proxy: provide "db_update" in "stats" response
* input
- curl: work around stream resume bug (fixed in libcurl 7.32.0)
* decoder
- fluidsynth: auto-detect by default
* clip 24 bit data from libsamplerate
...
...
src/input/CurlInputPlugin.cxx
View file @
d6247902
...
...
@@ -273,6 +273,16 @@ public:
SocketAction
(
CURL_SOCKET_TIMEOUT
,
0
);
}
/**
* This is a kludge to allow pausing/resuming a stream with
* libcurl < 7.32.0. Read the curl_easy_pause manpage for
* more information.
*/
void
ResumeSockets
()
{
int
running_handles
;
curl_multi_socket_all
(
multi
,
&
running_handles
);
}
private
:
static
int
TimerFunction
(
CURLM
*
multi
,
long
timeout_ms
,
void
*
userp
);
...
...
@@ -335,6 +345,13 @@ input_curl_resume(struct input_curl *c)
if
(
c
->
paused
)
{
c
->
paused
=
false
;
curl_easy_pause
(
c
->
easy
,
CURLPAUSE_CONT
);
if
(
curl_version_num
<
0x072000
)
/* libcurl older than 7.32.0 does not update
its sockets after curl_easy_pause(); force
libcurl to do it now */
curl_multi
->
ResumeSockets
();
curl_multi
->
InvalidateSockets
();
}
}
...
...
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