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
a889684a
Commit
a889684a
authored
Jun 30, 2008
by
Eric Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: hopefully allow seeking to work on static files
git-svn-id:
https://svn.musicpd.org/mpd/trunk@7398
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
c7d1ce07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
inputStream_http.c
src/inputStream_http.c
+2
-1
No files found.
src/inputStream_http.c
View file @
a889684a
...
@@ -686,7 +686,6 @@ static int recv_response(InputStream * is)
...
@@ -686,7 +686,6 @@ static int recv_response(InputStream * is)
parse_headers
(
is
,
response
,
needle
);
parse_headers
(
is
,
response
,
needle
);
if
(
is
->
size
<=
0
)
if
(
is
->
size
<=
0
)
is
->
seekable
=
0
;
is
->
seekable
=
0
;
is
->
seekable
=
0
;
needle
+=
sizeof
(
"
\r\n\r\n
"
)
-
1
;
needle
+=
sizeof
(
"
\r\n\r\n
"
)
-
1
;
peeked
=
needle
-
response
;
peeked
=
needle
-
response
;
assert
(
peeked
<=
r
);
assert
(
peeked
<=
r
);
...
@@ -810,6 +809,8 @@ int inputStream_httpSeek(InputStream * is, long offset, int whence)
...
@@ -810,6 +809,8 @@ int inputStream_httpSeek(InputStream * is, long offset, int whence)
}
}
diff
=
is
->
offset
-
old_offset
;
diff
=
is
->
offset
-
old_offset
;
if
(
!
diff
)
return
0
;
/* nothing to seek */
if
(
diff
>
0
)
{
/* seek forward if we've already buffered it */
if
(
diff
>
0
)
{
/* seek forward if we've already buffered it */
long
avail
=
(
long
)
ringbuf_read_space
(
data
->
rb
);
long
avail
=
(
long
)
ringbuf_read_space
(
data
->
rb
);
if
(
avail
>=
diff
)
{
if
(
avail
>=
diff
)
{
...
...
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