1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Update: Added protocol value for gopher

This commit is contained in:
Philipp Schafft 2018-03-01 10:19:01 +00:00
parent 33c9d81cb6
commit d56189eca9
2 changed files with 7 additions and 1 deletions

View File

@ -81,6 +81,8 @@ protocol_t client_protocol_from_string(const char *str)
return ICECAST_PROTOCOL_HTTP;
} else if (strcasecmp(str, "icy") == 0 || strcasecmp(str, "shoutcast") == 0) {
return ICECAST_PROTOCOL_SHOUTCAST;
} else if (strcasecmp(str, "gopher") == 0) {
return ICECAST_PROTOCOL_GOPHER;
} else {
ICECAST_LOG_ERROR("Unknown protocol \"%H\" string given. Returning ICECAST_PROTOCOL_HTTP.", str);
return ICECAST_PROTOCOL_HTTP;
@ -96,6 +98,9 @@ const char * client_protocol_to_string(protocol_t protocol)
case ICECAST_PROTOCOL_SHOUTCAST:
return "icy";
break;
case ICECAST_PROTOCOL_GOPHER:
return "gopher";
break;
}
return NULL;

View File

@ -40,7 +40,8 @@ typedef enum _document_domain_tag {
typedef enum _protocol_tag {
ICECAST_PROTOCOL_HTTP = 0,
ICECAST_PROTOCOL_SHOUTCAST
ICECAST_PROTOCOL_SHOUTCAST,
ICECAST_PROTOCOL_GOPHER
} protocol_t;
typedef enum _reuse_tag {