celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [23/51] celix git commit: CELIX-77: Fix issue in config_admin. Rename handle of service_factory service from factory->handle. The factory name can be confusing.
Date Mon, 25 Jan 2016 18:01:39 GMT
CELIX-77: Fix issue in config_admin. Rename handle of service_factory service from factory->handle.
The factory name can be confusing.


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

Branch: refs/heads/feature/CELIX-335_deploy_refactoring
Commit: 49ddf5743940f116999cf497dfc3e95321b53c8e
Parents: e06e14a
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Jan 12 17:15:51 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Jan 12 17:15:51 2016 +0100

----------------------------------------------------------------------
 config_admin/service/private/src/configuration_admin_factory.c | 6 +++---
 framework/private/src/service_registration.c                   | 4 ++--
 framework/public/include/service_factory.h                     | 6 +++---
 log_service/private/src/log_factory.c                          | 4 ++--
 .../rsa/private/src/import_registration_dfi.c                  | 2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/49ddf574/config_admin/service/private/src/configuration_admin_factory.c
----------------------------------------------------------------------
diff --git a/config_admin/service/private/src/configuration_admin_factory.c b/config_admin/service/private/src/configuration_admin_factory.c
index 9377ba5..99afbc0 100644
--- a/config_admin/service/private/src/configuration_admin_factory.c
+++ b/config_admin/service/private/src/configuration_admin_factory.c
@@ -100,7 +100,7 @@ celix_status_t configurationAdminFactory_create( bundle_context_pt context,
serv
 	this->managedServiceTracker = managedServiceTracker;
 	this->configurationStore = configurationStore;
 
-	(*factory)->factory = this;
+	(*factory)->handle = this;
 	(*factory)->getService = configurationAdminFactory_getService;
 	(*factory)->ungetService = configurationAdminFactory_ungetService;
 
@@ -119,11 +119,11 @@ celix_status_t configurationAdminFactory_destroy( bundle_context_pt
context, con
 
 /* ---------- public ---------- */
 
-celix_status_t configurationAdminFactory_getService(void *factory, bundle_pt bundle, service_registration_pt
registration, void **service){
+celix_status_t configurationAdminFactory_getService(void *handle, bundle_pt bundle, service_registration_pt
registration, void **service){
 
 	celix_status_t status;
 
-	configuration_admin_factory_pt configAdminFactory = (configuration_admin_factory_pt) factory;
+	configuration_admin_factory_pt configAdminFactory = (configuration_admin_factory_pt)handle;
 	configuration_admin_service_pt confAdminService;
 
 	// TODO

http://git-wip-us.apache.org/repos/asf/celix/blob/49ddf574/framework/private/src/service_registration.c
----------------------------------------------------------------------
diff --git a/framework/private/src/service_registration.c b/framework/private/src/service_registration.c
index fb8cd0d..f78fcca 100644
--- a/framework/private/src/service_registration.c
+++ b/framework/private/src/service_registration.c
@@ -194,7 +194,7 @@ celix_status_t serviceRegistration_getService(service_registration_pt
registrati
     celixThreadRwlock_readLock(&registration->lock);
     if (registration->isServiceFactory) {
         service_factory_pt factory = registration->serviceFactory;
-        status = factory->getService(factory->factory, bundle, registration, service);
+        status = factory->getService(factory->handle, bundle, registration, service);
     } else {
         (*service) = registration->svcObj;
     }
@@ -206,7 +206,7 @@ celix_status_t serviceRegistration_ungetService(service_registration_pt
registra
     celixThreadRwlock_readLock(&registration->lock);
     if (registration->isServiceFactory) {
         service_factory_pt factory = registration->serviceFactory;
-        factory->ungetService(factory->factory, bundle, registration, service);
+        factory->ungetService(factory->handle, bundle, registration, service);
     }
     celixThreadRwlock_unlock(&registration->lock);
     return CELIX_SUCCESS;

http://git-wip-us.apache.org/repos/asf/celix/blob/49ddf574/framework/public/include/service_factory.h
----------------------------------------------------------------------
diff --git a/framework/public/include/service_factory.h b/framework/public/include/service_factory.h
index a576548..0793a40 100644
--- a/framework/public/include/service_factory.h
+++ b/framework/public/include/service_factory.h
@@ -34,9 +34,9 @@ typedef struct service_factory * service_factory_pt;
 #include "bundle.h"
 
 struct service_factory {
-    void *factory;
-    celix_status_t (*getService)(void *factory, bundle_pt bundle, service_registration_pt
registration, void **service);
-    celix_status_t (*ungetService)(void *factory, bundle_pt bundle, service_registration_pt
registration, void **service);
+    void *handle;
+    celix_status_t (*getService)(void *handle, bundle_pt bundle, service_registration_pt
registration, void **service);
+    celix_status_t (*ungetService)(void *handle, bundle_pt bundle, service_registration_pt
registration, void **service);
 };
 
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ddf574/log_service/private/src/log_factory.c
----------------------------------------------------------------------
diff --git a/log_service/private/src/log_factory.c b/log_service/private/src/log_factory.c
index c4565ba..1c0a17a 100644
--- a/log_service/private/src/log_factory.c
+++ b/log_service/private/src/log_factory.c
@@ -49,7 +49,7 @@ celix_status_t logFactory_create(log_pt log, service_factory_pt *factory)
{
         } else {
             factoryData->log = log;
 
-            (*factory)->factory = factoryData;
+            (*factory)->handle = factoryData;
             (*factory)->getService = logFactory_getService;
             (*factory)->ungetService = logFactory_ungetService;
         }
@@ -62,7 +62,7 @@ celix_status_t logFactory_destroy(service_factory_pt *factory) {
     celix_status_t status = CELIX_SUCCESS;
 
 
-    free((*factory)->factory);
+    free((*factory)->handle);
     free(*factory);
 
     factory = NULL;

http://git-wip-us.apache.org/repos/asf/celix/blob/49ddf574/remote_services/remote_service_admin_dfi/rsa/private/src/import_registration_dfi.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/private/src/import_registration_dfi.c
b/remote_services/remote_service_admin_dfi/rsa/private/src/import_registration_dfi.c
index eab6215..16e27a5 100644
--- a/remote_services/remote_service_admin_dfi/rsa/private/src/import_registration_dfi.c
+++ b/remote_services/remote_service_admin_dfi/rsa/private/src/import_registration_dfi.c
@@ -75,7 +75,7 @@ celix_status_t importRegistration_create(bundle_context_pt context, endpoint_des
         celixThreadMutex_create(&reg->proxiesMutex, NULL);
         version_createVersionFromString((char*)serviceVersion,&(reg->version));
 
-        reg->factory->factory = reg;
+        reg->factory->handle = reg;
         reg->factory->getService = (void *)importRegistration_getService;
         reg->factory->ungetService = (void *)importRegistration_ungetService;
     } else {


Mime
View raw message