mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Move helper macros in admin.c to the top
This commit is contained in:
parent
4a5a85bc1e
commit
dccb3b9e13
25
src/admin.c
25
src/admin.c
@ -45,6 +45,19 @@
|
||||
|
||||
#define CATMODULE "admin"
|
||||
|
||||
/* Helper macros */
|
||||
#define COMMAND_REQUIRE(client,name,var) \
|
||||
do { \
|
||||
(var) = httpp_get_query_param((client)->parser, (name)); \
|
||||
if((var) == NULL) { \
|
||||
client_send_error((client), 400, 0, "Missing parameter"); \
|
||||
return; \
|
||||
} \
|
||||
} while(0);
|
||||
|
||||
#define COMMAND_OPTIONAL(client,name,var) \
|
||||
(var) = httpp_get_query_param((client)->parser, (name))
|
||||
|
||||
/* special commands */
|
||||
#define COMMAND_ERROR ADMIN_COMMAND_ERROR
|
||||
#define COMMAND_ANY ADMIN_COMMAND_ANY
|
||||
@ -387,18 +400,6 @@ void admin_handle_request(client_t *client, const char *uri)
|
||||
return;
|
||||
}
|
||||
|
||||
#define COMMAND_REQUIRE(client,name,var) \
|
||||
do { \
|
||||
(var) = httpp_get_query_param((client)->parser, (name)); \
|
||||
if((var) == NULL) { \
|
||||
client_send_error((client), 400, 0, "Missing parameter"); \
|
||||
return; \
|
||||
} \
|
||||
} while(0);
|
||||
|
||||
#define COMMAND_OPTIONAL(client,name,var) \
|
||||
(var) = httpp_get_query_param((client)->parser, (name))
|
||||
|
||||
static void html_success(client_t *client, char *message)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
Loading…
Reference in New Issue
Block a user