mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Update: Only look up first child if we really need to.
This commit is contained in:
parent
a014f1c5cc
commit
6f8270dcfb
@ -994,7 +994,7 @@ reportxml_t * reportxml_database_build_report(reportxml_database_t *db
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* first find the definition itself. This will be some REPORTXML_NODE_TYPE_DEFINITION node. */
|
/* first find the definition itself. This will be some REPORTXML_NODE_TYPE_DEFINITION node. */
|
||||||
definition = reportxml_database_build_node(db, id, depth);
|
definition = __reportxml_database_build_node_ext(db, id, depth, &type);
|
||||||
if (!definition) {
|
if (!definition) {
|
||||||
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
ICECAST_LOG_WARN("No matching definition for \"%H\"", id);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1013,16 +1013,18 @@ reportxml_t * reportxml_database_build_report(reportxml_database_t *db
|
|||||||
return reportxml_new();
|
return reportxml_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now the hard part: find out what level we are. */
|
if (type != REPORTXML_NODE_TYPE__ERROR) {
|
||||||
child = reportxml_node_get_child(definition, 0);
|
/* Now the hard part: find out what level we are. */
|
||||||
if (!child) {
|
child = reportxml_node_get_child(definition, 0);
|
||||||
refobject_unref(definition);
|
if (!child) {
|
||||||
ICECAST_LOG_ERROR("Can not get first child. BAD.");
|
refobject_unref(definition);
|
||||||
return NULL;
|
ICECAST_LOG_ERROR("Can not get first child. BAD.");
|
||||||
}
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
type = reportxml_node_get_type(child);
|
type = reportxml_node_get_type(child);
|
||||||
refobject_unref(child);
|
refobject_unref(child);
|
||||||
|
}
|
||||||
|
|
||||||
/* check for supported configurations */
|
/* check for supported configurations */
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user