mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Update: Reduce unnecessary config locks in XSLT loader
This commit is contained in:
parent
f52f562e76
commit
5cd32038d0
@ -269,10 +269,12 @@ static xmlDocPtr custom_loader(const xmlChar *URI,
|
|||||||
|
|
||||||
/* In case a top stylesheet is loaded */
|
/* In case a top stylesheet is loaded */
|
||||||
case XSLT_LOAD_START:
|
case XSLT_LOAD_START:
|
||||||
config = config_get_config();
|
/* Check if the admin URI is already cached */
|
||||||
|
if (admin_URI != NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if we need to load the admin path */
|
config = config_get_config();
|
||||||
if (!admin_URI) {
|
|
||||||
/* Append path separator to path */
|
/* Append path separator to path */
|
||||||
size_t len = strlen(config->adminroot_dir);
|
size_t len = strlen(config->adminroot_dir);
|
||||||
xmlChar* admin_path = xmlMalloc(len+2);
|
xmlChar* admin_path = xmlMalloc(len+2);
|
||||||
@ -287,7 +289,6 @@ static xmlDocPtr custom_loader(const xmlChar *URI,
|
|||||||
} else {
|
} else {
|
||||||
ICECAST_LOG_DEBUG("Loaded and cached admin_URI \"%s\"", admin_URI);
|
ICECAST_LOG_DEBUG("Loaded and cached admin_URI \"%s\"", admin_URI);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
config_release_config();
|
config_release_config();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user