Compare commits
5 Commits
0a9e774471
...
3e2f47000d
Author | SHA1 | Date |
---|---|---|
Stephan Jauernick | 3e2f47000d | |
Philipp Schafft | d0ebed5470 | |
Philipp Schafft | 573c7e51ab | |
Philipp Schafft | 75d7082e60 | |
Philipp Schafft | 6f2540426a |
|
@ -126,6 +126,8 @@ AC_CHECK_FUNCS([getrlimit])
|
|||
|
||||
dnl Checked only for reporting in version display as of now (may be used in future versions):
|
||||
AC_CHECK_FUNCS([pipe pipe2 socketpair posix_spawn posix_spawnp])
|
||||
AC_CHECK_FUNCS([posix_fadvise posix_fallocate posix_madvise])
|
||||
AC_CHECK_FUNCS([fallocate ftruncate])
|
||||
|
||||
dnl check for crypt():
|
||||
AC_SEARCH_LIBS([crypt_r], [crypt], [
|
||||
|
|
12
src/admin.c
12
src/admin.c
|
@ -1342,12 +1342,22 @@ static void command_shoutcast_metadata(client_t *client,
|
|||
|
||||
static void command_stats(client_t *client, source_t *source, admin_format_t response)
|
||||
{
|
||||
unsigned int flags = (source) ? STATS_XML_FLAG_SHOW_HIDDEN|STATS_XML_FLAG_SHOW_LISTENERS : STATS_XML_FLAG_SHOW_HIDDEN;
|
||||
unsigned int flags = STATS_XML_FLAG_SHOW_HIDDEN;
|
||||
const char *mount = (source) ? source->mount : NULL;
|
||||
xmlDocPtr doc;
|
||||
const char *show_listeners;
|
||||
|
||||
ICECAST_LOG_DEBUG("Stats request, sending xml stats");
|
||||
|
||||
COMMAND_OPTIONAL(client, "show-listeners", show_listeners);
|
||||
if (show_listeners) {
|
||||
if (util_str_to_bool(show_listeners))
|
||||
flags |= STATS_XML_FLAG_SHOW_LISTENERS;
|
||||
} else {
|
||||
if (source)
|
||||
flags |= STATS_XML_FLAG_SHOW_LISTENERS;
|
||||
}
|
||||
|
||||
doc = stats_get_xml(flags, mount, client);
|
||||
admin_send_response(doc, client, response, STATS_HTML_REQUEST);
|
||||
xmlFreeDoc(doc);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "common/thread/thread.h"
|
||||
#include "common/avl/avl.h"
|
||||
|
@ -62,6 +63,7 @@ struct reportxml_database_tag {
|
|||
mutex_t lock;
|
||||
/* The tree of definitions */
|
||||
avl_tree *definitions;
|
||||
bool loaded;
|
||||
};
|
||||
|
||||
/* The nodeattr structure is used to store definition of node attributes */
|
||||
|
@ -1061,6 +1063,8 @@ int reportxml_database_add_report(reportxml_database_t *db,
|
|||
avl_insert(db->definitions, copy);
|
||||
}
|
||||
|
||||
db->loaded = true;
|
||||
|
||||
thread_mutex_unlock(&(db->lock));
|
||||
|
||||
refobject_unref(root);
|
||||
|
@ -1310,7 +1314,10 @@ reportxml_t * reportxml_database_build_report(reportxml_database_t *db
|
|||
/* first find the definition itself. This will be some REPORTXML_NODE_TYPE_DEFINITION node. */
|
||||
definition = __reportxml_database_build_node_ext(db, id, depth, &type);
|
||||
if (!definition) {
|
||||
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
||||
if (db->loaded) {
|
||||
/* we ignore the log for db->loaded here as is most unlikely that we read a wrong value here AND this is just a diagnostic message */
|
||||
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1435,7 +1442,10 @@ reportxml_node_t * reportxml_database_build_fragment(reportxml_database_t *
|
|||
/* first find the definition itself. This will be some REPORTXML_NODE_TYPE_DEFINITION node. */
|
||||
definition = __reportxml_database_build_node_ext(db, id, depth, &got);
|
||||
if (!definition) {
|
||||
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
||||
if (db->loaded) {
|
||||
/* we ignore the log for db->loaded here as is most unlikely that we read a wrong value here AND this is just a diagnostic message */
|
||||
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -554,7 +554,7 @@ static refbuf_t *get_next_buffer (source_t *source)
|
|||
source->last_read = current;
|
||||
refbuf = source->format->get_buffer(source);
|
||||
if (client_body_eof(source->client)) {
|
||||
ICECAST_LOG_INFO("End of Stream %s", source->mount);
|
||||
ICECAST_LOG_INFO("End of Stream %H", source->mount);
|
||||
source->running = 0;
|
||||
continue;
|
||||
}
|
||||
|
@ -943,9 +943,9 @@ static void source_shutdown (source_t *source)
|
|||
{
|
||||
source->running = 0;
|
||||
if (source->con && source->con->ip) {
|
||||
ICECAST_LOG_INFO("Source from %s at \"%s\" exiting", source->con->ip, source->mount);
|
||||
ICECAST_LOG_INFO("Source from %s at %#H exiting", source->con->ip, source->mount);
|
||||
} else {
|
||||
ICECAST_LOG_INFO("Source at \"%s\" exiting", source->mount);
|
||||
ICECAST_LOG_INFO("Source at %#H exiting", source->mount);
|
||||
}
|
||||
|
||||
event_emit_va("source-disconnect", EVENT_EXTRA_SOURCE, source, EVENT_EXTRA_CLIENT, source->client, EVENT_EXTRA_LIST_END);
|
||||
|
|
|
@ -88,6 +88,21 @@ const char * const * version_get_compiletime_flags(void)
|
|||
#endif
|
||||
#ifdef HAVE_POSIX_SPAWNP
|
||||
"posix_spawnp",
|
||||
#endif
|
||||
#ifdef HAVE_POSIX_FADVISE
|
||||
"posix_fadvise",
|
||||
#endif
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
"posix_fallocate",
|
||||
#endif
|
||||
#ifdef HAVE_POSIX_MADVISE
|
||||
"posix_madvise",
|
||||
#endif
|
||||
#ifdef HAVE_FALLOCATE
|
||||
"fallocate",
|
||||
#endif
|
||||
#ifdef HAVE_FTRUNCATE
|
||||
"ftruncate",
|
||||
#endif
|
||||
/* ---[ OS ]--- */
|
||||
#ifdef WIN32
|
||||
|
|
Loading…
Reference in New Issue