This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch feature/refactor_bundle_cache
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/feature/refactor_bundle_cache
by this push:
new 3992e53e Avoid unnecessary `celix_bundle_getId`.
3992e53e is described below
commit 3992e53eb5abbc7541df921f999ea652785a99f2
Author: PengZheng <[email protected]>
AuthorDate: Wed Feb 22 12:31:40 2023 +0800
Avoid unnecessary `celix_bundle_getId`.
---
bundles/http_admin/http_admin/src/http_admin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bundles/http_admin/http_admin/src/http_admin.c
b/bundles/http_admin/http_admin/src/http_admin.c
index d8ec300a..cd26639b 100755
--- a/bundles/http_admin/http_admin/src/http_admin.c
+++ b/bundles/http_admin/http_admin/src/http_admin.c
@@ -474,7 +474,6 @@ static bool aliasList_containsAlias(celix_array_list_t
*alias_list, const char *
void http_admin_startBundle(void *data, const celix_bundle_t *bundle) {
http_admin_manager_t *admin = data;
- long bndId = celix_bundle_getId(bundle);
const char* aliases = celix_bundle_getManifestValue(bundle,
"X-Web-Resource");
if (aliases == NULL) {
celix_bundleContext_log(admin->context, CELIX_LOG_LEVEL_TRACE, "No
aliases found for bundle %s",
@@ -483,6 +482,7 @@ void http_admin_startBundle(void *data, const
celix_bundle_t *bundle) {
}
char* bundleRoot = celix_bundle_getEntry(bundle, "");
if (bundleRoot != NULL) {
+ long bndId = celix_bundle_getId(bundle);
createAliasesSymlink(aliases, admin->root, bundleRoot, bndId,
admin->aliasList);
} else {
celix_bundleContext_log(admin->context, CELIX_LOG_LEVEL_ERROR, "No
root for bundle %s",