Commit 8d513db4 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Added operation mode (omode) "strict".

This adds the operation mode "strict". It does not yet have
any specific features and alias the "normal" mode.
This change is mostly to make the setting of "strict" valid
so it can be used already.
parent 5dac23ad
......@@ -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;
......
......@@ -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 {
......
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