Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
ebecd7cb
Commit
ebecd7cb
authored
Jul 31, 2004
by
Ed "oddsock" Zaleski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix m3u generation logic that was not working for static files
svn path=/icecast/trunk/icecast/; revision=7439
parent
62bff456
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
32 deletions
+4
-32
src/connection.c
src/connection.c
+4
-32
No files found.
src/connection.c
View file @
ebecd7cb
...
...
@@ -841,11 +841,8 @@ static void _handle_get_request(connection_t *con,
char
*
sourceuri
=
strdup
(
uri
);
char
*
dot
=
strrchr
(
sourceuri
,
'.'
);
*
dot
=
0
;
avl_tree_rlock
(
global
.
source_tree
);
source
=
source_find_mount
(
sourceuri
);
if
(
source
)
{
client
->
respcode
=
200
;
bytes
=
sock_write
(
client
->
con
->
sock
,
client
->
respcode
=
200
;
bytes
=
sock_write
(
client
->
con
->
sock
,
"HTTP/1.0 200 OK
\r\n
"
"Content-Type: audio/x-mpegurl
\r\n\r\n
"
"http://%s:%d%s
\r\n
"
,
...
...
@@ -853,33 +850,8 @@ static void _handle_get_request(connection_t *con,
port
,
sourceuri
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
client_destroy
(
client
);
}
else
if
(
fileserve
)
{
fullpath
=
util_get_path_from_normalised_uri
(
sourceuri
);
if
(
stat
(
fullpath
,
&
statbuf
)
==
0
)
{
fserve_client_create
(
client
,
fullpath
);
free
(
fullpath
);
}
else
{
free
(
fullpath
);
fullpath
=
util_get_path_from_normalised_uri
(
uri
);
if
(
stat
(
fullpath
,
&
statbuf
)
==
0
)
{
fserve_client_create
(
client
,
fullpath
);
free
(
fullpath
);
}
else
{
free
(
fullpath
);
client_send_404
(
client
,
"The file you requested could not be found"
);
}
}
}
else
{
client_send_404
(
client
,
"The file you requested could not be found"
);
}
avl_tree_unlock
(
global
.
source_tree
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
client_destroy
(
client
);
free
(
sourceuri
);
return
;
}
...
...
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