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
5068227a
Commit
5068227a
authored
Aug 25, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/curl: move code to input_curl_flush_buffers()
Allow closing the handle while preserving the remaining buffers.
parent
f8f3bc89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
curl_input_plugin.c
src/input/curl_input_plugin.c
+9
-3
No files found.
src/input/curl_input_plugin.c
View file @
5068227a
...
...
@@ -181,6 +181,13 @@ buffer_free_callback(gpointer data, G_GNUC_UNUSED gpointer user_data)
g_free
(
data
);
}
static
void
input_curl_flush_buffers
(
struct
input_curl
*
c
)
{
g_queue_foreach
(
c
->
buffers
,
buffer_free_callback
,
NULL
);
g_queue_clear
(
c
->
buffers
);
}
/**
* Frees the current "libcurl easy" handle, and everything associated
* with it.
...
...
@@ -199,9 +206,6 @@ input_curl_easy_free(struct input_curl *c)
g_free
(
c
->
range
);
c
->
range
=
NULL
;
g_queue_foreach
(
c
->
buffers
,
buffer_free_callback
,
NULL
);
g_queue_clear
(
c
->
buffers
);
}
/**
...
...
@@ -215,6 +219,7 @@ input_curl_free(struct input_curl *c)
g_free
(
c
->
meta_name
);
input_curl_easy_free
(
c
);
input_curl_flush_buffers
(
c
);
if
(
c
->
multi
!=
NULL
)
curl_multi_cleanup
(
c
->
multi
);
...
...
@@ -797,6 +802,7 @@ input_curl_seek(struct input_stream *is, goffset offset, int whence,
/* close the old connection and open a new one */
input_curl_easy_free
(
c
);
input_curl_flush_buffers
(
c
);
is
->
offset
=
offset
;
if
(
is
->
offset
==
is
->
size
)
{
...
...
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