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:
parent
33c9d81cb6
commit
d56189eca9
@ -81,6 +81,8 @@ protocol_t client_protocol_from_string(const char *str)
|
|||||||
return ICECAST_PROTOCOL_HTTP;
|
return ICECAST_PROTOCOL_HTTP;
|
||||||
} else if (strcasecmp(str, "icy") == 0 || strcasecmp(str, "shoutcast") == 0) {
|
} else if (strcasecmp(str, "icy") == 0 || strcasecmp(str, "shoutcast") == 0) {
|
||||||
return ICECAST_PROTOCOL_SHOUTCAST;
|
return ICECAST_PROTOCOL_SHOUTCAST;
|
||||||
|
} else if (strcasecmp(str, "gopher") == 0) {
|
||||||
|
return ICECAST_PROTOCOL_GOPHER;
|
||||||
} else {
|
} else {
|
||||||
ICECAST_LOG_ERROR("Unknown protocol \"%H\" string given. Returning ICECAST_PROTOCOL_HTTP.", str);
|
ICECAST_LOG_ERROR("Unknown protocol \"%H\" string given. Returning ICECAST_PROTOCOL_HTTP.", str);
|
||||||
return ICECAST_PROTOCOL_HTTP;
|
return ICECAST_PROTOCOL_HTTP;
|
||||||
@ -96,6 +98,9 @@ const char * client_protocol_to_string(protocol_t protocol)
|
|||||||
case ICECAST_PROTOCOL_SHOUTCAST:
|
case ICECAST_PROTOCOL_SHOUTCAST:
|
||||||
return "icy";
|
return "icy";
|
||||||
break;
|
break;
|
||||||
|
case ICECAST_PROTOCOL_GOPHER:
|
||||||
|
return "gopher";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -40,7 +40,8 @@ typedef enum _document_domain_tag {
|
|||||||
|
|
||||||
typedef enum _protocol_tag {
|
typedef enum _protocol_tag {
|
||||||
ICECAST_PROTOCOL_HTTP = 0,
|
ICECAST_PROTOCOL_HTTP = 0,
|
||||||
ICECAST_PROTOCOL_SHOUTCAST
|
ICECAST_PROTOCOL_SHOUTCAST,
|
||||||
|
ICECAST_PROTOCOL_GOPHER
|
||||||
} protocol_t;
|
} protocol_t;
|
||||||
|
|
||||||
typedef enum _reuse_tag {
|
typedef enum _reuse_tag {
|
||||||
|
Loading…
Reference in New Issue
Block a user