CELIX-446: Fixes a bug in the service_registry/registration

Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/ae096821
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/ae096821
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/ae096821

Branch: refs/heads/develop
Commit: ae09682152db94204a12a2abd138e95e83af49ee
Parents: 626687f
Author: Pepijn Noltes <[email protected]>
Authored: Fri May 11 11:47:09 2018 +0200
Committer: Pepijn Noltes <[email protected]>
Committed: Fri May 11 11:47:09 2018 +0200

----------------------------------------------------------------------
 framework/src/service_registration.c | 4 ++--
 framework/src/service_registry.c     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/ae096821/framework/src/service_registration.c
----------------------------------------------------------------------
diff --git a/framework/src/service_registration.c 
b/framework/src/service_registration.c
index b3f45b2..91fa62c 100644
--- a/framework/src/service_registration.c
+++ b/framework/src/service_registration.c
@@ -38,13 +38,13 @@ static celix_status_t 
serviceRegistration_destroy(service_registration_pt regist
 
 service_registration_pt serviceRegistration_create(registry_callback_t 
callback, bundle_pt bundle, const char* serviceName, unsigned long serviceId, 
const void * serviceObject, properties_pt dictionary) {
     service_registration_pt registration = NULL;
-       serviceRegistration_createInternal(callback, bundle, serviceName, 
serviceId, serviceObject, dictionary, false, &registration);
+       serviceRegistration_createInternal(callback, bundle, serviceName, 
serviceId, serviceObject, dictionary, CELIX_PLAIN_SERVICE, &registration);
        return registration;
 }
 
 service_registration_pt 
serviceRegistration_createServiceFactory(registry_callback_t callback, 
bundle_pt bundle, const char* serviceName, unsigned long serviceId, const void 
* serviceObject, properties_pt dictionary) {
     service_registration_pt registration = NULL;
-    serviceRegistration_createInternal(callback, bundle, serviceName, 
serviceId, serviceObject, dictionary, true, &registration);
+    serviceRegistration_createInternal(callback, bundle, serviceName, 
serviceId, serviceObject, dictionary, CELIX_DEPRECATED_FACTORY_SERVICE, 
&registration);
     return registration;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/ae096821/framework/src/service_registry.c
----------------------------------------------------------------------
diff --git a/framework/src/service_registry.c b/framework/src/service_registry.c
index 1493525..026c252 100644
--- a/framework/src/service_registry.c
+++ b/framework/src/service_registry.c
@@ -147,11 +147,11 @@ celix_status_t 
serviceRegistry_getRegisteredServices(service_registry_pt registr
 }
 
 celix_status_t serviceRegistry_registerService(service_registry_pt registry, 
bundle_pt bundle, const char* serviceName, const void* serviceObject, 
properties_pt dictionary, service_registration_pt *registration) {
-    return serviceRegistry_registerServiceInternal(registry, bundle, 
serviceName, serviceObject, dictionary, false, registration);
+    return serviceRegistry_registerServiceInternal(registry, bundle, 
serviceName, serviceObject, dictionary, CELIX_PLAIN_SERVICE, registration);
 }
 
 celix_status_t serviceRegistry_registerServiceFactory(service_registry_pt 
registry, bundle_pt bundle, const char* serviceName, service_factory_pt 
factory, properties_pt dictionary, service_registration_pt *registration) {
-    return serviceRegistry_registerServiceInternal(registry, bundle, 
serviceName, (const void *) factory, dictionary, true, registration);
+    return serviceRegistry_registerServiceInternal(registry, bundle, 
serviceName, (const void *) factory, dictionary, 
CELIX_DEPRECATED_FACTORY_SERVICE, registration);
 }
 
 static celix_status_t 
serviceRegistry_registerServiceInternal(service_registry_pt registry, bundle_pt 
bundle, const char* serviceName, const void * serviceObject, properties_pt 
dictionary, enum celix_service_type svcType, service_registration_pt 
*registration) {

Reply via email to