mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Merge fixes from trunk.
svn path=/icecast/branches/icecast-webm/; revision=18358
This commit is contained in:
parent
1ff1520e12
commit
636a2959f3
@ -620,7 +620,7 @@ static refbuf_t *mp3_get_filter_meta (source_t *source)
|
|||||||
memcpy (meta->data, source_mp3->build_metadata,
|
memcpy (meta->data, source_mp3->build_metadata,
|
||||||
source_mp3->build_metadata_len);
|
source_mp3->build_metadata_len);
|
||||||
|
|
||||||
DEBUG1("shoutcast metadata %.4080s", meta->data+1);
|
DEBUG2("shoutcast metadata %.*s", 4080, meta->data+1);
|
||||||
if (strncmp (meta->data+1, "StreamTitle=", 12) == 0)
|
if (strncmp (meta->data+1, "StreamTitle=", 12) == 0)
|
||||||
{
|
{
|
||||||
filter_shoutcast_metadata (source, source_mp3->build_metadata,
|
filter_shoutcast_metadata (source, source_mp3->build_metadata,
|
||||||
|
10
src/fserve.c
10
src/fserve.c
@ -412,7 +412,7 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
|||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
fullpath = util_get_path_from_normalised_uri (path);
|
fullpath = util_get_path_from_normalised_uri (path);
|
||||||
INFO2 ("checking for file %s (%s)", path, fullpath);
|
INFO2 ("checking for file %H (%H)", path, fullpath);
|
||||||
|
|
||||||
if (strcmp (util_get_extension (fullpath), "m3u") == 0)
|
if (strcmp (util_get_extension (fullpath), "m3u") == 0)
|
||||||
m3u_requested = 1;
|
m3u_requested = 1;
|
||||||
@ -429,7 +429,7 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
|||||||
/* the m3u can be generated, but send an m3u file if available */
|
/* the m3u can be generated, but send an m3u file if available */
|
||||||
if (m3u_requested == 0 && xslt_playlist_requested == NULL)
|
if (m3u_requested == 0 && xslt_playlist_requested == NULL)
|
||||||
{
|
{
|
||||||
WARN2 ("req for file \"%s\" %s", fullpath, strerror (errno));
|
WARN2 ("req for file \"%H\" %s", fullpath, strerror (errno));
|
||||||
client_send_404 (httpclient, "The file you requested could not be found");
|
client_send_404 (httpclient, "The file you requested could not be found");
|
||||||
free (fullpath);
|
free (fullpath);
|
||||||
return -1;
|
return -1;
|
||||||
@ -500,7 +500,7 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
|||||||
config = config_get_config();
|
config = config_get_config();
|
||||||
if (config->fileserve == 0)
|
if (config->fileserve == 0)
|
||||||
{
|
{
|
||||||
DEBUG1 ("on demand file \"%s\" refused", fullpath);
|
DEBUG1 ("on demand file \"%H\" refused", fullpath);
|
||||||
client_send_404 (httpclient, "The file you requested could not be found");
|
client_send_404 (httpclient, "The file you requested could not be found");
|
||||||
config_release_config();
|
config_release_config();
|
||||||
free (fullpath);
|
free (fullpath);
|
||||||
@ -511,7 +511,7 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
|||||||
if (S_ISREG (file_buf.st_mode) == 0)
|
if (S_ISREG (file_buf.st_mode) == 0)
|
||||||
{
|
{
|
||||||
client_send_404 (httpclient, "The file you requested could not be found");
|
client_send_404 (httpclient, "The file you requested could not be found");
|
||||||
WARN1 ("found requested file but there is no handler for it: %s", fullpath);
|
WARN1 ("found requested file but there is no handler for it: %H", fullpath);
|
||||||
free (fullpath);
|
free (fullpath);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -519,7 +519,7 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
|||||||
file = fopen (fullpath, "rb");
|
file = fopen (fullpath, "rb");
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
WARN1 ("Problem accessing file \"%s\"", fullpath);
|
WARN1 ("Problem accessing file \"%H\"", fullpath);
|
||||||
client_send_404 (httpclient, "File not readable");
|
client_send_404 (httpclient, "File not readable");
|
||||||
free (fullpath);
|
free (fullpath);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user