celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [celix] branch master updated: Fix for sigabort on the resize of an hashmap
Date Wed, 28 Oct 2020 18:45:09 GMT
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 <noek1993@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;


Mime
View raw message