mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
Feature: Added database functions to find name of listener_type_t, and tlsmode_t
This commit is contained in:
parent
82edb5c670
commit
4cf821d592
@ -858,3 +858,45 @@ static inline int listensocket__select_isset(listensocket_t *self, fd_set *set)
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
const char * listensocket_type_to_string(listener_type_t type)
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case LISTENER_TYPE_ERROR:
|
||||||
|
return NULL;
|
||||||
|
break;
|
||||||
|
case LISTENER_TYPE_NORMAL:
|
||||||
|
return "normal";
|
||||||
|
break;
|
||||||
|
case LISTENER_TYPE_VIRTUAL:
|
||||||
|
return "virtual";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * listensocket_tlsmode_to_string(tlsmode_t mode)
|
||||||
|
{
|
||||||
|
switch (mode) {
|
||||||
|
case ICECAST_TLSMODE_DISABLED:
|
||||||
|
return "disabled";
|
||||||
|
break;
|
||||||
|
case ICECAST_TLSMODE_AUTO:
|
||||||
|
return "auto";
|
||||||
|
break;
|
||||||
|
case ICECAST_TLSMODE_AUTO_NO_PLAIN:
|
||||||
|
return "auto_no_plain";
|
||||||
|
break;
|
||||||
|
case ICECAST_TLSMODE_RFC2817:
|
||||||
|
return "rfc2817";
|
||||||
|
break;
|
||||||
|
case ICECAST_TLSMODE_RFC2818:
|
||||||
|
return "rfc2818";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
@ -33,4 +33,7 @@ const listener_t * listensocket_get_listener(listensocket_t *self);
|
|||||||
int listensocket_release_listener(listensocket_t *self);
|
int listensocket_release_listener(listensocket_t *self);
|
||||||
listener_type_t listensocket_get_type(listensocket_t *self);
|
listener_type_t listensocket_get_type(listensocket_t *self);
|
||||||
|
|
||||||
|
const char * listensocket_type_to_string(listener_type_t type);
|
||||||
|
const char * listensocket_tlsmode_to_string(tlsmode_t mode);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user