PengZheng commented on a change in pull request #399:
URL: https://github.com/apache/celix/pull/399#discussion_r811169493
##########
File path: libs/framework/src/service_registry.c
##########
@@ -422,33 +416,15 @@ celix_status_t
serviceRegistry_getServiceReferences(service_registry_pt registry
return status;
}
-celix_status_t serviceRegistry_retainServiceReference(service_registry_pt
registry, bundle_pt bundle, service_reference_pt reference) {
- celix_status_t status = CELIX_SUCCESS;
- bundle_pt refBundle = NULL;
-
- celixThreadRwlock_writeLock(®istry->lock);
- serviceReference_getOwner(reference, &refBundle);
- if (refBundle == bundle) {
- serviceReference_retain(reference);
- } else {
- status = CELIX_ILLEGAL_ARGUMENT;
- fw_log(registry->framework->logger, CELIX_LOG_LEVEL_ERROR, "cannot
retain a service reference from an other bundle (in ref %p) (provided %p).",
refBundle, bundle);
- }
- celixThreadRwlock_unlock(®istry->lock);
-
- return status;
-}
-
-
celix_status_t serviceRegistry_ungetServiceReference(service_registry_pt
registry, bundle_pt bundle, service_reference_pt reference) {
celix_status_t status = CELIX_SUCCESS;
bool destroyed = false;
size_t count = 0;
- celixThreadRwlock_writeLock(®istry->lock);
Review comment:
This change is problematic, a following patch is being prepared.
--
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]