From 3b4e3ed0ed4b2cef106735e6a5e1049e20067b4c Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 13 Jan 2015 08:42:02 +0000 Subject: [PATCH] Cleanup: more cleanly define blocks for admin command IDs This adds info to the blocks about their size. Also added two more blocks: * for experimental features such as in private branches or or feature branches. This is for command IDs that are going to be merged with master some day. At merge they need to be changed and put into the regular position. * for private features that are not going to be merged into master. e.g. specific features for a very specific user that are not useful for general audiance. This should help keeping stuff sorted and largey reducing the risk of command ID collissions on merges of branches. Also this should make the merger's job a little bit more easy as there are less likely any conflicts on merge if someone else got a number closeby and those change is within the diff's context lines. --- src/admin.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/admin.c b/src/admin.c index 9c423d00..4a8ac1e5 100644 --- a/src/admin.c +++ b/src/admin.c @@ -49,7 +49,7 @@ #define COMMAND_ERROR ADMIN_COMMAND_ERROR #define COMMAND_ANY ADMIN_COMMAND_ANY -/* Mount-specific commands */ +/* Mount-specific commands (block 1-49 and 50-99) */ #define COMMAND_RAW_FALLBACK 1 #define COMMAND_RAW_METADATA_UPDATE 2 #define COMMAND_RAW_SHOW_LISTENERS 3 @@ -65,7 +65,7 @@ #define COMMAND_TRANSFORMED_UPDATEMETADATA 56 #define COMMAND_TRANSFORMED_METADATA_UPDATE 57 -/* Global commands */ +/* Global commands (block 101-199 and 201-299) */ #define COMMAND_RAW_LIST_MOUNTS 101 #define COMMAND_RAW_STATS 102 #define COMMAND_RAW_LISTSTREAM 103 @@ -76,15 +76,19 @@ #define COMMAND_TRANSFORMED_LISTSTREAM 203 #define COMMAND_TRANSFORMED_QUEUE_RELOAD 205 -/* Client management commands */ +/* Client management commands (block 301-399 and 401-499) */ #define COMMAND_RAW_KILL_CLIENT 301 #define COMMAND_RAW_KILL_SOURCE 302 #define COMMAND_TRANSFORMED_KILL_CLIENT 401 #define COMMAND_TRANSFORMED_KILL_SOURCE 402 -/* Admin commands requiring no auth */ +/* Admin commands requiring no auth (block 501-599) */ #define COMMAND_BUILDM3U 501 +/* Experimental features (e.g. in feature branches) (block 801-899) */ + +/* Private features (in branches not for merge with master) (block 901-999) */ + #define FALLBACK_RAW_REQUEST "fallbacks" #define FALLBACK_TRANSFORMED_REQUEST "fallbacks.xsl" #define SHOUTCAST_METADATA_REQUEST "admin.cgi"