You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2020/10/28 18:45:09 UTC

[celix] branch master updated: Fix for sigabort on the resize of an hashmap

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e5b6e2  Fix for sigabort on the resize of an hashmap
     new ad6d438  Merge pull request #288 from Noek1993/master
2e5b6e2 is described below

commit 2e5b6e2a92281e5437b668577921ebdec9a438d1
Author: Koen Mulder <no...@outlook.com>
AuthorDate: Fri Oct 23 12:29:10 2020 +0200

    Fix for sigabort on the resize of an hashmap
---
 libs/framework/src/service_registry.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libs/framework/src/service_registry.c b/libs/framework/src/service_registry.c
index de4de64..e9b8d01 100644
--- a/libs/framework/src/service_registry.c
+++ b/libs/framework/src/service_registry.c
@@ -1154,7 +1154,9 @@ celix_status_t celix_serviceRegistry_addServiceListener(celix_service_registry_t
         service_registration_pt reg = celix_arrayList_get(registrations, i);
         long svcId = serviceRegistration_getServiceId(reg);
         service_reference_pt ref = NULL;
+        celixThreadRwlock_writeLock(&registry->lock);
         serviceRegistry_getServiceReference_internal(registry, bundle, reg, &ref);
+        celixThreadRwlock_unlock(&registry->lock);
         celix_service_event_t event;
         event.reference = ref;
         event.type = OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED;