diff --git a/src/cfgfile.c b/src/cfgfile.c index 8d3139bb..e4b1db16 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -156,6 +156,8 @@ operation_mode config_str_to_omode(const char *str) return OMODE_NORMAL; } else if (strcasecmp(str, "legacy-compat") == 0 || strcasecmp(str, "legacy") == 0) { return OMODE_LEGACY; + } else if (strcasecmp(str, "strict") == 0) { + return OMODE_STRICT; } else { ICECAST_LOG_ERROR("Unknown operation mode \"%s\", falling back to DEFAULT.", str); return OMODE_DEFAULT; diff --git a/src/cfgfile.h b/src/cfgfile.h index 3fa3336e..93d6e9ff 100644 --- a/src/cfgfile.h +++ b/src/cfgfile.h @@ -33,9 +33,24 @@ struct _mount_proxy; #define XMLSTR(str) ((xmlChar *)(str)) typedef enum _operation_mode { + /* Default operation mode. may depend on context */ OMODE_DEFAULT = 0, + /* The normal mode. */ OMODE_NORMAL, - OMODE_LEGACY + /* Mimic some of the behavior of older versions. + * This mode should only be used in transition to normal mode, + * e.g. to give some clients time to upgrade to new API. + */ + OMODE_LEGACY, + /* The struct mode includes some behavior for future versions + * that can for some reason not yet be used in the normal mode + * e.g. because it may break interfaces in some way. + * New applications should test against this mode and developer + * of software interacting with Icecast on an API level should + * have a look for strict mode behavior to avoid random breakage + * with newer versions of Icecast. + */ + OMODE_STRICT } operation_mode; typedef enum _http_header_type {