Author: abroekhuis
Date: Tue Jul 19 20:54:19 2011
New Revision: 1148521
URL: http://svn.apache.org/viewvc?rev=1148521&view=rev
Log:
Updated log service to unregister the services. Added bundle_getBundleId
convenience function.
Modified:
incubator/celix/trunk/framework/private/include/bundle.h
incubator/celix/trunk/framework/private/src/bundle.c
incubator/celix/trunk/log_service/private/src/log_service_activator.c
Modified: incubator/celix/trunk/framework/private/include/bundle.h
URL:
http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle.h?rev=1148521&r1=1148520&r2=1148521&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle.h Tue Jul 19
20:54:19 2011
@@ -80,5 +80,6 @@ celix_status_t bundle_closeAndDelete(BUN
celix_status_t bundle_close(BUNDLE bundle);
celix_status_t bundle_refresh(BUNDLE bundle);
+celix_status_t bundle_getBundleId(BUNDLE bundle, long *id);
#endif /* BUNDLE_H_ */
Modified: incubator/celix/trunk/framework/private/src/bundle.c
URL:
http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle.c?rev=1148521&r1=1148520&r2=1148521&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle.c Tue Jul 19 20:54:19
2011
@@ -443,4 +443,10 @@ celix_status_t bundle_refresh(BUNDLE bun
return status;
}
+celix_status_t bundle_getBundleId(BUNDLE bundle, long *id) {
+ celix_status_t status = CELIX_SUCCESS;
+ status = bundleArchive_getId(bundle_getArchive(bundle), id);
+ return status;
+}
+
Modified: incubator/celix/trunk/log_service/private/src/log_service_activator.c
URL:
http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/private/src/log_service_activator.c?rev=1148521&r1=1148520&r2=1148521&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/private/src/log_service_activator.c
(original)
+++ incubator/celix/trunk/log_service/private/src/log_service_activator.c Tue
Jul 19 20:54:19 2011
@@ -88,6 +88,13 @@ celix_status_t bundleActivator_start(voi
}
celix_status_t bundleActivator_stop(void * userData, BUNDLE_CONTEXT context) {
+ struct logActivator * activator = (struct logActivator *) userData;
+
+ serviceRegistration_unregister(activator->logReaderServiceReg);
+ activator->logReaderServiceReg = NULL;
+ serviceRegistration_unregister(activator->logServiceFactoryReg);
+ activator->logServiceFactoryReg = NULL;
+
return CELIX_SUCCESS;
}