1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-16 06:15:24 +00:00

Update: Translated __add_authstack() into public function stats_add_authstack()

This commit is contained in:
Philipp Schafft 2022-03-06 18:15:34 +00:00
parent b7a10102d1
commit 4319e8c0e6
2 changed files with 6 additions and 3 deletions

View File

@ -825,7 +825,8 @@ static int _send_event_to_client(stats_event_t *event, client_t *client)
return 0; return 0;
} }
static inline void __add_authstack (auth_stack_t *stack, xmlNodePtr parent) { void stats_add_authstack(auth_stack_t *stack, xmlNodePtr parent)
{
xmlNodePtr authentication; xmlNodePtr authentication;
authentication = xmlNewTextChild(parent, NULL, XMLSTR("authentication"), NULL); authentication = xmlNewTextChild(parent, NULL, XMLSTR("authentication"), NULL);
@ -866,7 +867,7 @@ static xmlNodePtr _dump_stats_to_doc (xmlNodePtr root, unsigned int flags, const
flags &= ~(STATS_XML_FLAG_SHOW_LISTENERS|STATS_XML_FLAG_SHOW_HIDDEN); flags &= ~(STATS_XML_FLAG_SHOW_LISTENERS|STATS_XML_FLAG_SHOW_HIDDEN);
} else { } else {
config = config_get_config(); config = config_get_config();
__add_authstack(config->authstack, root); stats_add_authstack(config->authstack, root);
config_release_config(); config_release_config();
} }
@ -941,7 +942,7 @@ static xmlNodePtr _dump_stats_to_doc (xmlNodePtr root, unsigned int flags, const
config = config_get_config(); config = config_get_config();
mountproxy = config_find_mount(config, source->source, MOUNT_TYPE_NORMAL); mountproxy = config_find_mount(config, source->source, MOUNT_TYPE_NORMAL);
if (mountproxy) if (mountproxy)
__add_authstack(mountproxy->authstack, xmlnode); stats_add_authstack(mountproxy->authstack, xmlnode);
config_release_config(); config_release_config();
} }
} }

View File

@ -103,5 +103,7 @@ void stats_sendxml(client_t *client);
xmlDocPtr stats_get_xml(unsigned int flags, const char *show_mount, client_t *client); xmlDocPtr stats_get_xml(unsigned int flags, const char *show_mount, client_t *client);
char *stats_get_value(const char *source, const char *name); char *stats_get_value(const char *source, const char *name);
void stats_add_authstack(auth_stack_t *stack, xmlNodePtr parent);
#endif /* __STATS_H__ */ #endif /* __STATS_H__ */