mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
parent
b9d00301e7
commit
96d6190dbf
@ -1064,6 +1064,10 @@ static void _handle_get_request(client_t *client) {
|
||||
}
|
||||
}
|
||||
|
||||
if (source->no_mount) {
|
||||
client_send_error_by_id(client, ICECAST_ERROR_CON_MOUNT_NO_FOR_DIRECT_ACCESS);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set max listening duration in case not already set. */
|
||||
if (client->con->discon_time == 0) {
|
||||
|
@ -99,6 +99,9 @@ static const icecast_error_t __errors[] = {
|
||||
{.id = ICECAST_ERROR_CON_UPGRADE_ERROR, .http_status = 400 /* XXX */,
|
||||
.uuid = "ec16f654-f262-415f-ab91-95703ae33704",
|
||||
.message = "Can not upgrade protocol"},
|
||||
{.id = ICECAST_ERROR_CON_MOUNT_NO_FOR_DIRECT_ACCESS, .http_status = 400 /* XXX */,
|
||||
.uuid = "652548c6-2a7d-4c73-a1c5-e53759032bd1",
|
||||
.message = "Mountpoint is not available for direct access"},
|
||||
{.id = ICECAST_ERROR_FSERV_FILE_NOT_FOUND, .http_status = 404,
|
||||
.uuid = "18c32b43-0d8e-469d-b434-10133cdd06ad",
|
||||
.message = "The file you requested could not be found"},
|
||||
|
@ -37,6 +37,7 @@ typedef enum {
|
||||
ICECAST_ERROR_CON_UNIMPLEMENTED,
|
||||
ICECAST_ERROR_CON_UNKNOWN_REQUEST,
|
||||
ICECAST_ERROR_CON_UPGRADE_ERROR,
|
||||
ICECAST_ERROR_CON_MOUNT_NO_FOR_DIRECT_ACCESS,
|
||||
ICECAST_ERROR_FSERV_FILE_NOT_FOUND,
|
||||
ICECAST_ERROR_FSERV_FILE_NOT_READABLE,
|
||||
ICECAST_ERROR_FSERV_REQUEST_RANGE_NOT_SATISFIABLE,
|
||||
|
@ -1000,6 +1000,7 @@ static void source_apply_mount (ice_config_t *config, source_t *source, mount_pr
|
||||
source->max_listeners = mountinfo->max_listeners;
|
||||
source->fallback_override = mountinfo->fallback_override;
|
||||
source->hidden = mountinfo->hidden;
|
||||
source->no_mount = mountinfo->no_mount;
|
||||
}
|
||||
|
||||
/* if a setting is available in the mount details then use it, else
|
||||
|
@ -76,6 +76,7 @@ struct source_tag {
|
||||
int on_demand;
|
||||
int on_demand_req;
|
||||
int hidden;
|
||||
int no_mount; // copy of mount_proxy->no_mount
|
||||
time_t last_read;
|
||||
int short_delay;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user