This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/async_svc_registration in repository https://gitbox.apache.org/repos/asf/celix.git
commit 7511a9fbc3ea8ffcc0779e27e99153a1c23bf3ed Author: Pepijn Noltes <[email protected]> AuthorDate: Sun Oct 4 20:52:46 2020 +0200 Fixes some issues --- bundles/http_admin/http_admin/src/http_admin.c | 7 ++++--- bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c | 3 ++- .../remote_example_api/org.apache.celix.RemoteExample.descriptor | 2 +- libs/framework/src/bundle_context.c | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bundles/http_admin/http_admin/src/http_admin.c b/bundles/http_admin/http_admin/src/http_admin.c index ca7c93d..20b2287 100755 --- a/bundles/http_admin/http_admin/src/http_admin.c +++ b/bundles/http_admin/http_admin/src/http_admin.c @@ -122,17 +122,17 @@ void httpAdmin_destroy(http_admin_manager_t *admin) { //Destroy alias map by removing symbolic links first. unsigned int size = celix_arrayList_size(admin->aliasList); - for (unsigned int i = (size - 1); i < size; i--) { + for (int i = 0; i < size; ++i) { http_alias_t *alias = celix_arrayList_get(admin->aliasList, i); //Delete alias in cache directory - if (remove(alias->alias_path) < 0) + if (remove(alias->alias_path) < 0) { fprintf(stdout, "remove of %s failed\n", alias->alias_path); + } free(alias->url); free(alias->alias_path); free(alias); - celix_arrayList_removeAt(admin->aliasList, i); } celix_arrayList_destroy(admin->aliasList); @@ -520,6 +520,7 @@ void http_admin_stopBundle(void *data, const celix_bundle_t *bundle) { http_alias_t *alias = arrayList_get(admin->aliasList, i); if(alias->bundle_id == bundle_id) { remove(alias->alias_path); //Delete alias in cache directory + free(alias->url); free(alias->alias_path); free(alias); celix_arrayList_removeAt(admin->aliasList, i); diff --git a/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c b/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c index c1a715e..e7d504f 100644 --- a/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c +++ b/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c @@ -170,8 +170,9 @@ celix_properties_t* pubsubEndpoint_createFromPublisherTrackerInfo(bundle_context data.topic = topic; celix_bundleContext_useBundle(ctx, bundleId, &data, retrieveTopicProperties); + pubsubEndpoint_setFields(ep, fwUUID, scope, topic, PUBSUB_PUBLISHER_ENDPOINT_TYPE, NULL, NULL, NULL, data.props); + if (data.props != NULL) { - pubsubEndpoint_setFields(ep, fwUUID, scope, topic, PUBSUB_PUBLISHER_ENDPOINT_TYPE, NULL, NULL, NULL, data.props); celix_properties_destroy(data.props); //safe to delete, properties are copied in pubsubEndpoint_setFields } diff --git a/bundles/remote_services/examples/remote_example_api/org.apache.celix.RemoteExample.descriptor b/bundles/remote_services/examples/remote_example_api/org.apache.celix.RemoteExample.descriptor index 6cbefb2..0558c7f 100644 --- a/bundles/remote_services/examples/remote_example_api/org.apache.celix.RemoteExample.descriptor +++ b/bundles/remote_services/examples/remote_example_api/org.apache.celix.RemoteExample.descriptor @@ -16,4 +16,4 @@ setName2=setName2(#am=handle;P#const=true;t#am=out;*t)N setEnum=setEnum(#am=handle;Plenum_example;#am=pre;Lenum_example;)N action=action(#am=handle;P)N setComplex=setComplex(#am=handle;PLcomplex_input;#am=out;*Lcomplex_output;)N -createAdditionalRemoteService=createAdditionalRemoteService(#am=handle;P)N \ No newline at end of file +createAdditionalRemoteService=createAdditionalRemoteService(#am=handle;P)N diff --git a/libs/framework/src/bundle_context.c b/libs/framework/src/bundle_context.c index 29bd2ea..34a3dcb 100644 --- a/libs/framework/src/bundle_context.c +++ b/libs/framework/src/bundle_context.c @@ -1310,6 +1310,7 @@ static long celix_bundleContext_trackServicesWithOptionsInternal(celix_bundle_co entry->destroyEventId = celix_framework_nextEventId(ctx->framework); celixThreadMutex_lock(&ctx->mutex); entry->trackerId = ctx->nextTrackerId++; + trackerId = entry->trackerId; hashMap_put(ctx->serviceTrackers, (void *) trackerId, entry); celixThreadMutex_unlock(&ctx->mutex); }
