Commit 62734e49 authored by Marvin Scholz's avatar Marvin Scholz Committed by Philipp Schafft
Browse files

Refactor admin.c handlers

parent e99ebfae
This diff is collapsed.
...@@ -903,7 +903,6 @@ static inline ssize_t __count_user_role_on_mount (source_t *source, client_t *cl ...@@ -903,7 +903,6 @@ static inline ssize_t __count_user_role_on_mount (source_t *source, client_t *cl
static void _handle_get_request(client_t *client, char *uri) { static void _handle_get_request(client_t *client, char *uri) {
source_t *source = NULL; source_t *source = NULL;
ICECAST_LOG_DEBUG("Got client %p with URI %H", client, uri); ICECAST_LOG_DEBUG("Got client %p with URI %H", client, uri);
/* there are several types of HTTP GET clients /* there are several types of HTTP GET clients
...@@ -914,11 +913,15 @@ static void _handle_get_request(client_t *client, char *uri) { ...@@ -914,11 +913,15 @@ static void _handle_get_request(client_t *client, char *uri) {
stats_event_inc(NULL, "client_connections"); stats_event_inc(NULL, "client_connections");
/* Dispatch all admin requests */ /* Dispatch legacy admin.cgi requests */
if ((strcmp(uri, "/admin.cgi") == 0) || if (strcmp(uri, "/admin.cgi") == 0) {
(strncmp(uri, "/admin/", 7) == 0)) { ICECAST_LOG_DEBUG("Client %p requesting admin interface.", client);
admin_handle_request(client, uri + 1);
return;
} /* Dispatch all admin requests */
else if (strncmp(uri, "/admin/", 7) == 0) {
ICECAST_LOG_DEBUG("Client %p requesting admin interface.", client); ICECAST_LOG_DEBUG("Client %p requesting admin interface.", client);
admin_handle_request(client, uri); admin_handle_request(client, uri + 7);
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment