PengZheng commented on code in PR #476:
URL: https://github.com/apache/celix/pull/476#discussion_r1114208088
##########
bundles/http_admin/http_admin/src/http_admin.c:
##########
@@ -480,33 +473,22 @@ static bool aliasList_containsAlias(celix_array_list_t
*alias_list, const char *
}
void http_admin_startBundle(void *data, const celix_bundle_t *bundle) {
- bundle_archive_pt archive = NULL;
- bundle_revision_pt revision = NULL;
- manifest_pt manifest = NULL;
-
http_admin_manager_t *admin = data;
-
- // Retrieve manifest from current bundle revision (retrieve revision from
bundle archive) to check for
- // Amdatu pattern manifest property X-Web-Resource. This property is used
for aliases.
- celix_status_t status = bundle_getArchive((celix_bundle_t*)bundle,
&archive);
- if(status == CELIX_SUCCESS && archive != NULL) {
- status = bundleArchive_getCurrentRevision(archive, &revision);
+ const char* aliases = celix_bundle_getManifestValue(bundle,
"X-Web-Resource");
Review Comment:
We should avoid all the following (including memory allocation and file
operation) for non-web bundles.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]