This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-osgi-defines in repository https://gitbox.apache.org/repos/asf/celix.git
commit 3dd60e1c9120138801222b1b11e0c6de8ab6b3a6 Author: Pepijn Noltes <[email protected]> AuthorDate: Sat Oct 28 19:04:10 2023 +0200 #509: Fix wrong replace of get svc id to svc pid --- bundles/logging/log_admin/src/celix_log_admin.c | 4 ++-- bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c | 4 ++-- .../pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c | 4 ++-- .../src/pubsub_websocket_topic_receiver.c | 4 ++-- bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c | 4 ++-- .../pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c | 4 ++-- bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c | 4 ++-- bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c | 4 ++-- .../pubsub_topology_manager/src/pubsub_topology_manager.c | 8 ++++---- bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c | 10 +++++----- .../gtest/src/DiscoveryZeroconfActivatorTestSuite.cc | 2 +- .../gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc | 2 +- .../gtest/src/DiscoveryZeroconfIntegrationTestSuite.cc | 2 +- .../gtest/src/DiscoveryZeroconfWatcherTestSuite.cc | 2 +- .../discovery_zeroconf/src/discovery_zeroconf_watcher.c | 4 ++-- .../remote_service_admin_dfi/src/remote_service_admin_dfi.c | 6 +++--- .../rsa_shm/gtest/src/RsaShmActivatorUnitTestSuite.cc | 2 +- .../rsa_shm/gtest/src/RsaShmClientServerUnitTestSuite.cc | 2 +- .../rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc | 4 ++-- .../rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc | 6 +++--- .../rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc | 2 +- .../rsa_shm/gtest/src/RsaShmIntegrationTestSuite.cc | 2 +- .../rsa_shm/src/rsa_shm_export_registration.c | 2 +- .../remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c | 8 ++++---- .../rsa_common/src/remote_interceptors_handler.c | 4 ++-- .../remote_services/topology_manager/src/topology_manager.c | 4 ++-- bundles/shell/shell/src/c_shell.c | 4 ++-- .../services_example_c/src/dynamic_consumer_example.c | 4 ++-- libs/framework/gtest/src/CxxBundleContextTestSuite.cc | 4 ++-- libs/framework/src/bundle_context.c | 2 +- libs/framework/src/service_reference.c | 4 ++-- libs/framework/src/service_registration.c | 2 +- libs/framework/src/service_registry.c | 4 ++-- libs/framework/src/service_tracker.c | 2 +- 34 files changed, 65 insertions(+), 65 deletions(-) diff --git a/bundles/logging/log_admin/src/celix_log_admin.c b/bundles/logging/log_admin/src/celix_log_admin.c index 5b53d2fe..5b983ef1 100644 --- a/bundles/logging/log_admin/src/celix_log_admin.c +++ b/bundles/logging/log_admin/src/celix_log_admin.c @@ -286,7 +286,7 @@ static void celix_logAdmin_addSink(void *handle, void *svc, const celix_properti celix_log_admin_t* admin = handle; celix_log_sink_t* sink = svc; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char* sinkName = celix_properties_get(props, CELIX_LOG_SINK_PROPERTY_NAME, NULL); char nameBuf[16]; if (sinkName == NULL) { @@ -313,7 +313,7 @@ static void celix_logAdmin_addSink(void *handle, void *svc, const celix_properti static void celix_logAdmin_remSink(void *handle, void *svc CELIX_UNUSED, const celix_properties_t* props) { celix_log_admin_t* admin = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char* sinkName = celix_properties_get(props, CELIX_LOG_SINK_PROPERTY_NAME, NULL); char nameBuf[16]; if (sinkName == NULL) { diff --git a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c index 28ca7bc3..07a76719 100644 --- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c +++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c @@ -217,7 +217,7 @@ void pubsub_tcpAdmin_addProtocolSvc(void *handle, void *svc, const celix_propert pubsub_tcp_admin_t *psa = handle; const char *protType = celix_properties_get(props, PUBSUB_PROTOCOL_TYPE_KEY, NULL); - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); if (protType == NULL) { L_INFO("[PSA_tcp] Ignoring protocol service without %s property", PUBSUB_PROTOCOL_TYPE_KEY); @@ -238,7 +238,7 @@ void pubsub_tcpAdmin_addProtocolSvc(void *handle, void *svc, const celix_propert void pubsub_tcpAdmin_removeProtocolSvc(void *handle, void *svc, const celix_properties_t *props) { pubsub_tcp_admin_t *psa = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); //remove protocol // 1) First find entry and diff --git a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c index a71d3dc0..8d2c1ec0 100644 --- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c +++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c @@ -409,7 +409,7 @@ void pubsub_tcpTopicReceiver_disconnectFrom(pubsub_tcp_topic_receiver_t *receive static void pubsub_tcpTopicReceiver_addSubscriber(void *handle, void *svc, const celix_properties_t *props) { pubsub_tcp_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); const char *subScope = celix_properties_get(props, PUBSUB_SUBSCRIBER_SCOPE, NULL); if (receiver->scope == NULL) { if (subScope != NULL) { @@ -438,7 +438,7 @@ static void pubsub_tcpTopicReceiver_addSubscriber(void *handle, void *svc, const static void pubsub_tcpTopicReceiver_removeSubscriber(void *handle, void *svc CELIX_UNUSED, const celix_properties_t *props) { pubsub_tcp_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); celixThreadMutex_lock(&receiver->subscribers.mutex); psa_tcp_subscriber_entry_t *entry = celix_longHashMap_get(receiver->subscribers.map, svcId); diff --git a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c index 92ed911b..67237610 100644 --- a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c +++ b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c @@ -391,7 +391,7 @@ void pubsub_websocketTopicReceiver_disconnectFrom(pubsub_websocket_topic_receive static void pubsub_websocketTopicReceiver_addSubscriber(void *handle, void *svc, const celix_properties_t *props) { pubsub_websocket_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); const char *subScope = celix_properties_get(props, PUBSUB_SUBSCRIBER_SCOPE, NULL); if (receiver->scope == NULL){ if (subScope != NULL){ @@ -420,7 +420,7 @@ static void pubsub_websocketTopicReceiver_addSubscriber(void *handle, void *svc, static void pubsub_websocketTopicReceiver_removeSubscriber(void *handle, void *svc CELIX_UNUSED, const celix_properties_t *props) { pubsub_websocket_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); celixThreadMutex_lock(&receiver->subscribers.mutex); psa_websocket_subscriber_entry_t *entry = hashMap_remove(receiver->subscribers.map, (void*)svcId); diff --git a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c index 154e66c7..cd70e503 100644 --- a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c +++ b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c @@ -277,7 +277,7 @@ void pubsub_zmqAdmin_addProtocolSvc(void *handle, void *svc, const celix_propert pubsub_zmq_admin_t *psa = handle; const char *protType = celix_properties_get(props, PUBSUB_PROTOCOL_TYPE_KEY, NULL); - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); if (protType == NULL) { L_INFO("[PSA_ZMQ] Ignoring protocol service without %s property", PUBSUB_PROTOCOL_TYPE_KEY); @@ -298,7 +298,7 @@ void pubsub_zmqAdmin_addProtocolSvc(void *handle, void *svc, const celix_propert void pubsub_zmqAdmin_removeProtocolSvc(void *handle, void *svc, const celix_properties_t *props) { pubsub_zmq_admin_t *psa = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); //remove protocol // 1) First find entry and diff --git a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c index 44ea40ab..14fb8b9e 100644 --- a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c +++ b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c @@ -380,7 +380,7 @@ void pubsub_zmqTopicReceiver_disconnectFrom(pubsub_zmq_topic_receiver_t *receive static void pubsub_zmqTopicReceiver_addSubscriber(void *handle, void *svc, const celix_properties_t *props) { pubsub_zmq_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); const char *subScope = celix_properties_get(props, PUBSUB_SUBSCRIBER_SCOPE, NULL); if (receiver->scope == NULL) { if (subScope != NULL) { @@ -409,7 +409,7 @@ static void pubsub_zmqTopicReceiver_addSubscriber(void *handle, void *svc, const static void pubsub_zmqTopicReceiver_removeSubscriber(void *handle, void *svc, const celix_properties_t *props) { pubsub_zmq_topic_receiver_t *receiver = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); celixThreadMutex_lock(&receiver->subscribers.mutex); psa_zmq_subscriber_entry_t *entry = hashMap_remove(receiver->subscribers.map, (void*)svcId); diff --git a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c index a86d0458..2e0169d4 100644 --- a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c +++ b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c @@ -359,7 +359,7 @@ void pubsub_discovery_discoveredEndpointsListenerAdded(void *handle, void *svc, pubsub_discovery_t *disc = handle; pubsub_discovered_endpoint_listener_t *listener = svc; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadMutex_lock(&disc->discoveredEndpointsListenersMutex); hashMap_put(disc->discoveredEndpointsListeners, (void*)svcId, listener); celixThreadMutex_unlock(&disc->discoveredEndpointsListenersMutex); @@ -376,7 +376,7 @@ void pubsub_discovery_discoveredEndpointsListenerAdded(void *handle, void *svc, void pubsub_discovery_discoveredEndpointsListenerRemoved(void *handle, void *svc, const celix_properties_t *props, const celix_bundle_t *bnd) { pubsub_discovery_t *disc = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadMutex_lock(&disc->discoveredEndpointsListenersMutex); hashMap_remove(disc->discoveredEndpointsListeners, (void*)svcId); celixThreadMutex_unlock(&disc->discoveredEndpointsListenersMutex); diff --git a/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c b/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c index 010c6905..3298b8fd 100644 --- a/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c +++ b/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c @@ -199,8 +199,8 @@ int referenceCompare(const void *a, const void *b) { const entry_t *aEntry = a; const entry_t *bEntry = b; - long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); - long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); + long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); + long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); long servRankingA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); long servRankingB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); diff --git a/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c b/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c index fbb2f9be..1e84515c 100644 --- a/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c +++ b/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c @@ -181,7 +181,7 @@ void pubsub_topologyManager_psaAdded(void *handle, void *svc, const celix_proper pubsub_admin_service_t *psa = (pubsub_admin_service_t *) svc; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char* psaType = celix_properties_get(props, PUBSUB_ADMIN_SERVICE_TYPE, "!Error!"); celix_logHelper_debug(manager->loghelper, "Added %s PSA", psaType); @@ -229,7 +229,7 @@ void pubsub_topologyManager_psaAdded(void *handle, void *svc, const celix_proper void pubsub_topologyManager_psaRemoved(void *handle, void *svc CELIX_UNUSED, const celix_properties_t *props) { pubsub_topology_manager_t *manager = handle; //pubsub_admin_service_t *psa = (pubsub_admin_service_t*) svc; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char* psaType = celix_properties_get(props, PUBSUB_ADMIN_SERVICE_TYPE, "!Error!"); celix_logHelper_debug(manager->loghelper, "Removing %s PSA", psaType); @@ -1156,7 +1156,7 @@ static void *pstm_psaHandlingThread(void *data) { void pubsub_topologyManager_addMetricsService(void * handle, void *svc, const celix_properties_t *props) { pubsub_topology_manager_t *manager = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadMutex_lock(&manager->psaMetrics.mutex); hashMap_put(manager->psaMetrics.map, (void*)svcId, svc); celixThreadMutex_unlock(&manager->psaMetrics.mutex); @@ -1164,7 +1164,7 @@ void pubsub_topologyManager_addMetricsService(void * handle, void *svc, const ce void pubsub_topologyManager_removeMetricsService(void * handle, void *svc, const celix_properties_t *props) { pubsub_topology_manager_t *manager = handle; - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadMutex_lock(&manager->psaMetrics.mutex); hashMap_remove(manager->psaMetrics.map, (void*)svcId); celixThreadMutex_unlock(&manager->psaMetrics.mutex); diff --git a/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c b/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c index 34a4c7a3..2515eb99 100644 --- a/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c +++ b/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c @@ -82,8 +82,8 @@ static int compareEntries(const void *a, const void *b) { const pubsub_serialization_service_entry_t* aEntry = a; const pubsub_serialization_service_entry_t* bEntry = b; - long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); - long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); + long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); + long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); long servRankingA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); long servRankingB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); @@ -164,7 +164,7 @@ pubsub_serializer_handler_t* pubsub_serializerHandler_createForMarkerService(cel data.logHelper = logHelper; char filter[32]; - snprintf(filter, 32, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_PID, pubsubSerializerMarkerSvcId); + snprintf(filter, 32, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_ID, pubsubSerializerMarkerSvcId); celix_service_use_options_t opts = CELIX_EMPTY_SERVICE_USE_OPTIONS; opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_MARKER_NAME; opts.filter.filter = filter; @@ -209,7 +209,7 @@ void pubsub_serializerHandler_destroy(pubsub_serializer_handler_t* handler) { } void pubsub_serializerHandler_addSerializationService(pubsub_serializer_handler_t* handler, pubsub_message_serialization_service_t* svc, const celix_properties_t* svcProperties) { - long svcId = celix_properties_getAsLong(svcProperties, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(svcProperties, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char *msgFqn = celix_properties_get(svcProperties, PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_FQN_PROPERTY, NULL); const char *version = celix_properties_get(svcProperties, PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_VERSION_PROPERTY, "0.0.0"); uint32_t msgId = (uint32_t)celix_properties_getAsLong(svcProperties, PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_ID_PROPERTY, 0L); @@ -271,7 +271,7 @@ void pubsub_serializerHandler_addSerializationService(pubsub_serializer_handler_ } void pubsub_serializerHandler_removeSerializationService(pubsub_serializer_handler_t* handler, pubsub_message_serialization_service_t* svc, const celix_properties_t* svcProperties) { - long svcId = celix_properties_getAsLong(svcProperties, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(svcProperties, CELIX_FRAMEWORK_SERVICE_ID, -1L); const char *msgFqn = celix_properties_get(svcProperties, PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_FQN_PROPERTY, NULL); uint32_t msgId = (uint32_t)celix_properties_getAsLong(svcProperties, PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_ID_PROPERTY, 0L); if (msgId == 0) { diff --git a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfActivatorTestSuite.cc b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfActivatorTestSuite.cc index 9c01fffb..2dbb1bfc 100644 --- a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfActivatorTestSuite.cc +++ b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfActivatorTestSuite.cc @@ -30,7 +30,7 @@ class DiscoveryZeroconfActivatorTestSuite : public ::testing::Test { public: DiscoveryZeroconfActivatorTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".dzc_act_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc index 8c5158ab..a15a4c79 100644 --- a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc +++ b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc @@ -57,7 +57,7 @@ public: } DiscoveryZeroconfAnnouncerTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".dzc_announcer_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfIntegrationTestSuite.cc b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfIntegrationTestSuite.cc index 0419140c..704b28cc 100644 --- a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfIntegrationTestSuite.cc +++ b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfIntegrationTestSuite.cc @@ -26,7 +26,7 @@ class DiscoveryZeroconfIntegrationTestSuite : public ::testing::Test { public: DiscoveryZeroconfIntegrationTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".dzc_integration_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc index d70e1290..4d6d67be 100644 --- a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc +++ b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc @@ -81,7 +81,7 @@ public: DiscoveryZeroconfWatcherTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".dzc_watcher_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c index ace71f1c..308a9c92 100644 --- a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c +++ b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c @@ -189,7 +189,7 @@ static void discoveryZeroconfWatcher_addEPL(void *handle, void *svc, const celix assert(props != NULL); discovery_zeroconf_watcher_t *watcher = (discovery_zeroconf_watcher_t *)handle; endpoint_listener_t *epl = (endpoint_listener_t *)svc; - long serviceId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long serviceId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); if (serviceId == -1) { return; } @@ -225,7 +225,7 @@ static void discoveryZeroconfWatcher_removeEPL(void *handle, void *svc, const ce assert(props != NULL); discovery_zeroconf_watcher_t *watcher = (discovery_zeroconf_watcher_t *)handle; endpoint_listener_t *epl = (endpoint_listener_t *)svc; - long serviceId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + long serviceId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); if (serviceId == -1) { return; } diff --git a/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c b/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c index d08033e6..14de6e30 100644 --- a/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c +++ b/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c @@ -611,7 +611,7 @@ celix_status_t remoteServiceAdmin_exportService(remote_service_admin_t *admin, c service_reference_pt reference = NULL; char filter[256]; - snprintf(filter, 256, "(%s=%s)", (char *) CELIX_FRAMEWORK_SERVICE_PID, serviceId); + snprintf(filter, 256, "(%s=%s)", (char *) CELIX_FRAMEWORK_SERVICE_ID, serviceId); status = bundleContext_getServiceReferences(admin->context, NULL, filter, &references); @@ -745,10 +745,10 @@ static celix_status_t remoteServiceAdmin_createEndpointDescription(remote_servic } } - hash_map_entry_pt entry = hashMap_getEntry(endpointProperties, (void *) CELIX_FRAMEWORK_SERVICE_PID); + hash_map_entry_pt entry = hashMap_getEntry(endpointProperties, (void *) CELIX_FRAMEWORK_SERVICE_ID); char* key = hashMapEntry_getKey(entry); - char *serviceId = (char *) hashMap_remove(endpointProperties, (void *) CELIX_FRAMEWORK_SERVICE_PID); + char *serviceId = (char *) hashMap_remove(endpointProperties, (void *) CELIX_FRAMEWORK_SERVICE_ID); const char *uuid = NULL; char buf[512]; diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmActivatorUnitTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmActivatorUnitTestSuite.cc index bb0649b7..4ec9ce1c 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmActivatorUnitTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmActivatorUnitTestSuite.cc @@ -29,7 +29,7 @@ class RsaShmActivatorUnitTestSuite : public ::testing::Test { public: RsaShmActivatorUnitTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "onFirstInit"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "onFirstInit"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmClientServerUnitTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmClientServerUnitTestSuite.cc index f651b9fd..44ae8d99 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmClientServerUnitTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmClientServerUnitTestSuite.cc @@ -45,7 +45,7 @@ class RsaShmClientServerUnitTestSuite : public ::testing::Test { public: RsaShmClientServerUnitTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_client_server_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc index fa413af0..565f50d9 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc @@ -72,7 +72,7 @@ class RsaShmExportRegUnitTestSuite : public ::testing::Test { public: RsaShmExportRegUnitTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_export_reg_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); @@ -144,7 +144,7 @@ public: service_reference_pt GetServiceReference() { celix_array_list_t *references = nullptr; char filter[32] = {0}; - snprintf(filter, sizeof(filter), "(%s=%ld)", (char *) CELIX_FRAMEWORK_SERVICE_PID, calcSvcId); + snprintf(filter, sizeof(filter), "(%s=%ld)", (char *) CELIX_FRAMEWORK_SERVICE_ID, calcSvcId); auto status = bundleContext_getServiceReferences(ctx.get(), nullptr, filter, &references); EXPECT_EQ(CELIX_SUCCESS, status); service_reference_pt reference = (service_reference_pt) celix_arrayList_get(references, 0); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc index 759439a1..0b41f6e5 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc @@ -52,7 +52,7 @@ class RsaShmUnitTestSuite : public ::testing::Test { public: RsaShmUnitTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_impl_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); @@ -718,7 +718,7 @@ class RsaShmRpcTestSuite : public ::testing::Test { public: RsaShmRpcTestSuite() { auto* clientProps = celix_properties_create(); - celix_properties_set(clientProps, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(clientProps, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(clientProps, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_client_cache"); celix_properties_set(clientProps, "CELIX_FRAMEWORK_EXTENDER_PATH", RESOURCES_DIR); auto* clientFwPtr = celix_frameworkFactory_createFramework(clientProps); @@ -736,7 +736,7 @@ public: auto* serverProps = celix_properties_create(); - celix_properties_set(serverProps, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(serverProps, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(serverProps, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_server_cache"); celix_properties_set(serverProps, "CELIX_FRAMEWORK_EXTENDER_PATH", RESOURCES_DIR); auto* serverFwPtr = celix_frameworkFactory_createFramework(serverProps); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc index 54ec1016..c4982d6d 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc @@ -68,7 +68,7 @@ class RsaShmImportRegUnitTestSuite : public ::testing::Test { public: RsaShmImportRegUnitTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "true"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "true"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_import_reg_test_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmIntegrationTestSuite.cc b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmIntegrationTestSuite.cc index 5733dc1a..54f927dc 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmIntegrationTestSuite.cc +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmIntegrationTestSuite.cc @@ -24,7 +24,7 @@ class RsaShmActivatorTestSuite : public ::testing::Test { public: RsaShmActivatorTestSuite() { auto* props = celix_properties_create(); - celix_properties_set(props, CELIX_FRAMEWORK_FRAMEWORK_STORAGE_CLEAN_NAME, "onFirstInit"); + celix_properties_set(props, CELIX_FRAMEWORK_CLEAN_CACHE_DIR_ON_CREATE, "onFirstInit"); celix_properties_set(props, CELIX_FRAMEWORK_CACHE_DIR, ".rsa_shm_cache"); auto* fwPtr = celix_frameworkFactory_createFramework(props); auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr); diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c index 7d83422c..16135f1e 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c @@ -241,7 +241,7 @@ static void exportRegistration_addRpcFac(void *handle, void *svc) { } char filter[32] = {0};// It is longer than the size of "service.id" + reqHandlerSvcId - (void)snprintf(filter, sizeof(filter), "(%s=%ld)", CELIX_FRAMEWORK_SERVICE_PID, + (void)snprintf(filter, sizeof(filter), "(%s=%ld)", CELIX_FRAMEWORK_SERVICE_ID, reqHandlerSvcId); celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS; opts.filter.filter = filter; diff --git a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c index 03e14435..d45854f8 100755 --- a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c +++ b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c @@ -235,7 +235,7 @@ static void rsaShm_overlayProperties(celix_properties_t *additionalProperties, c const char *servicePropKey = NULL; CELIX_PROPERTIES_FOR_EACH(additionalProperties, additionalPropKey) { if (strcmp(additionalPropKey,(char*) CELIX_FRAMEWORK_SERVICE_NAME) != 0 - && strcmp(additionalPropKey,(char*) CELIX_FRAMEWORK_SERVICE_PID) != 0) { + && strcmp(additionalPropKey,(char*) CELIX_FRAMEWORK_SERVICE_ID) != 0) { bool propKeyCaseEqual = false; CELIX_PROPERTIES_FOR_EACH(serviceProperties, servicePropKey) { @@ -294,7 +294,7 @@ celix_status_t rsaShm_exportService(rsa_shm_t *admin, char *serviceId, celix_array_list_t *references = NULL; service_reference_pt reference = NULL; char filter[32] = {0};// It is longer than the size of "service.id" + serviceId - snprintf(filter, sizeof(filter), "(%s=%s)", (char *) CELIX_FRAMEWORK_SERVICE_PID, serviceId); + snprintf(filter, sizeof(filter), "(%s=%s)", (char *) CELIX_FRAMEWORK_SERVICE_ID, serviceId); status = bundleContext_getServiceReferences(admin->context, NULL, filter, &references); if (status != CELIX_SUCCESS) { celix_logHelper_error(admin->logHelper,"Error getting reference for service id %s.", serviceId); @@ -496,9 +496,9 @@ static celix_status_t rsaShm_createEndpointDescription(rsa_shm_t *admin, celix_properties_unset(endpointProperties,CELIX_FRAMEWORK_SERVICE_NAME); celix_properties_unset(endpointProperties,OSGI_RSA_SERVICE_EXPORTED_INTERFACES); celix_properties_unset(endpointProperties,OSGI_RSA_SERVICE_EXPORTED_CONFIGS); - celix_properties_unset(endpointProperties, CELIX_FRAMEWORK_SERVICE_PID); + celix_properties_unset(endpointProperties, CELIX_FRAMEWORK_SERVICE_ID); - long serviceId = celix_properties_getAsLong(exportedProperties, CELIX_FRAMEWORK_SERVICE_PID, -1); + long serviceId = celix_properties_getAsLong(exportedProperties, CELIX_FRAMEWORK_SERVICE_ID, -1); uuid_t endpoint_uid; uuid_generate(endpoint_uid); diff --git a/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c b/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c index 332d15c3..ec39685f 100644 --- a/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c +++ b/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c @@ -203,8 +203,8 @@ int referenceCompare(const void *a, const void *b) { const entry_t *aEntry = a; const entry_t *bEntry = b; - long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); - long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_PID, 0); + long servIdA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); + long servIdB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_ID, 0); long servRankingA = celix_properties_getAsLong(aEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); long servRankingB = celix_properties_getAsLong(bEntry->properties, CELIX_FRAMEWORK_SERVICE_RANKING, 0); diff --git a/bundles/remote_services/topology_manager/src/topology_manager.c b/bundles/remote_services/topology_manager/src/topology_manager.c index 0625ab8d..c58115ff 100644 --- a/bundles/remote_services/topology_manager/src/topology_manager.c +++ b/bundles/remote_services/topology_manager/src/topology_manager.c @@ -227,7 +227,7 @@ celix_status_t topologyManager_rsaAdded(void * handle, service_reference_pt unus service_reference_pt reference = hashMapEntry_getKey(entry); const char* serviceId = NULL; - serviceReference_getProperty(reference, CELIX_FRAMEWORK_SERVICE_PID, &serviceId); + serviceReference_getProperty(reference, CELIX_FRAMEWORK_SERVICE_ID, &serviceId); scope_getExportProperties(manager->scope, reference, &serviceProperties); @@ -346,7 +346,7 @@ celix_status_t topologyManager_exportScopeChanged(void *handle, char *filterStr) status = filter_match(filter, props, &found); if (found) { srvRefs[nrFound] = reference; - serviceReference_getProperty(reference, CELIX_FRAMEWORK_SERVICE_PID, &serviceId); + serviceReference_getProperty(reference, CELIX_FRAMEWORK_SERVICE_ID, &serviceId); srvIds[nrFound++] = (char*)serviceId; } } diff --git a/bundles/shell/shell/src/c_shell.c b/bundles/shell/shell/src/c_shell.c index 6113a3f2..364e5d89 100644 --- a/bundles/shell/shell/src/c_shell.c +++ b/bundles/shell/shell/src/c_shell.c @@ -60,7 +60,7 @@ celix_status_t shell_addCommand(shell_t *shell, celix_shell_command_t *svc, cons celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING, "Command service must contain a '%s' property!", CELIX_SHELL_COMMAND_NAME); status = CELIX_BUNDLE_EXCEPTION; } else { - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadRwlock_writeLock(&shell->lock); if (hashMap_containsKey(shell->commandServices, name)) { celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING, "Command with name %s already registered!", name); @@ -90,7 +90,7 @@ celix_status_t shell_removeCommand(shell_t *shell, celix_shell_command_t *svc, c celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING, "Command service must contain a '%s' property!", CELIX_SHELL_COMMAND_NAME); status = CELIX_BUNDLE_EXCEPTION; } else { - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); celixThreadRwlock_writeLock(&shell->lock); if (hashMap_containsKey(shell->commandServices, name)) { celix_shell_command_entry_t *entry = hashMap_get(shell->commandServices, name); diff --git a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c index 5a7464ae..4d06ba7a 100644 --- a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c +++ b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c @@ -72,7 +72,7 @@ static void gccExample(activator_data_t *data) { void use(void *handle, void *svc, const celix_properties_t *props) { example_calc_t *calc = svc; rank = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, -1L); - svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); result = calc->calc(calc->handle, 1); } @@ -102,7 +102,7 @@ static void removeSvc(activator_data_t *data, void *svc CELIX_UNUSED) { static void useHighest(activator_data_t *data CELIX_UNUSED, example_calc_t *svc, const celix_properties_t *props) { int result = svc->calc(svc->handle, 2); - long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1L); + long svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1L); long rank = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, -1L); printf("Called highest ranking service. Result is %i, svc id is %li, svc ranking is %li\n", result, svcId, rank); } diff --git a/libs/framework/gtest/src/CxxBundleContextTestSuite.cc b/libs/framework/gtest/src/CxxBundleContextTestSuite.cc index f602ac78..f40f9a58 100644 --- a/libs/framework/gtest/src/CxxBundleContextTestSuite.cc +++ b/libs/framework/gtest/src/CxxBundleContextTestSuite.cc @@ -144,13 +144,13 @@ TEST_F(CxxBundleContextTestSuite, UseServicesTest) { .setTimeout(std::chrono::seconds{1}) .addUseCallback([&countFromFunction](CInterface&, const celix::Properties& props){ countFromFunction += 1; - auto id = props.getAsLong(CELIX_FRAMEWORK_SERVICE_PID, -1L); + auto id = props.getAsLong(CELIX_FRAMEWORK_SERVICE_ID, -1L); EXPECT_GT(id, -1L); }) .build(); count += ctx->useServices<CInterface>().addUseCallback([&countFromFunction](CInterface&, const celix::Properties& props, const celix::Bundle& bnd) { countFromFunction += 1; - EXPECT_GE(props.getAsLong(CELIX_FRAMEWORK_SERVICE_PID, -1L), 0); + EXPECT_GE(props.getAsLong(CELIX_FRAMEWORK_SERVICE_ID, -1L), 0); EXPECT_GE(bnd.getId(), -1L); }).build(); EXPECT_EQ(count, 4); diff --git a/libs/framework/src/bundle_context.c b/libs/framework/src/bundle_context.c index 9ffdb126..d8b2c95c 100644 --- a/libs/framework/src/bundle_context.c +++ b/libs/framework/src/bundle_context.c @@ -1015,7 +1015,7 @@ bool celix_bundleContext_useServiceWithId( celix_service_use_options_t opts = CELIX_EMPTY_SERVICE_USE_OPTIONS; char filter[64]; - snprintf(filter, 64, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_PID, serviceId); + snprintf(filter, 64, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_ID, serviceId); opts.filter.serviceName = serviceName; opts.filter.filter = filter; diff --git a/libs/framework/src/service_reference.c b/libs/framework/src/service_reference.c index 604ee70a..bce59c59 100644 --- a/libs/framework/src/service_reference.c +++ b/libs/framework/src/service_reference.c @@ -263,8 +263,8 @@ celix_status_t serviceReference_compareTo(service_reference_pt reference, servic long id, other_id; const char* id_str; const char* other_id_str; - serviceReference_getProperty(reference, (char *) CELIX_FRAMEWORK_SERVICE_PID, &id_str); - serviceReference_getProperty(compareTo, (char *) CELIX_FRAMEWORK_SERVICE_PID, &other_id_str); + serviceReference_getProperty(reference, (char *) CELIX_FRAMEWORK_SERVICE_ID, &id_str); + serviceReference_getProperty(compareTo, (char *) CELIX_FRAMEWORK_SERVICE_ID, &other_id_str); id = atol(id_str); other_id = atol(other_id_str); diff --git a/libs/framework/src/service_registration.c b/libs/framework/src/service_registration.c index 76046787..5564d331 100644 --- a/libs/framework/src/service_registration.c +++ b/libs/framework/src/service_registration.c @@ -100,7 +100,7 @@ static celix_status_t serviceRegistration_initializeProperties(service_registrat snprintf(sId, 32, "%lu", registration->serviceId); - properties_set(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_PID, sId); + properties_set(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_ID, sId); if (properties_get(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_NAME) == NULL) { properties_set(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_NAME, registration->className); diff --git a/libs/framework/src/service_registry.c b/libs/framework/src/service_registry.c index 54e076d3..1b64a7da 100644 --- a/libs/framework/src/service_registry.c +++ b/libs/framework/src/service_registry.c @@ -861,8 +861,8 @@ static int celix_serviceRegistry_compareRegistrations(const void *a, const void serviceRegistration_getProperties((service_registration_t*)regA, &propsA); serviceRegistration_getProperties((service_registration_t*)regB, &propsB); - long servIdA = celix_properties_getAsLong(propsA, CELIX_FRAMEWORK_SERVICE_PID, 0); - long servIdB = celix_properties_getAsLong(propsB, CELIX_FRAMEWORK_SERVICE_PID, 0); + long servIdA = celix_properties_getAsLong(propsA, CELIX_FRAMEWORK_SERVICE_ID, 0); + long servIdB = celix_properties_getAsLong(propsB, CELIX_FRAMEWORK_SERVICE_ID, 0); long servRankingA = celix_properties_getAsLong(propsA, CELIX_FRAMEWORK_SERVICE_RANKING, 0); long servRankingB = celix_properties_getAsLong(propsB, CELIX_FRAMEWORK_SERVICE_RANKING, 0); diff --git a/libs/framework/src/service_tracker.c b/libs/framework/src/service_tracker.c index 4eb3d3f5..18d07cd4 100644 --- a/libs/framework/src/service_tracker.c +++ b/libs/framework/src/service_tracker.c @@ -441,7 +441,7 @@ static void serviceTracker_checkAndInvokeSetService(void *handle, void *highestS //no services available anymore -> unset == call with NULL update = true; } else { - svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID, -1); + svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_ID, -1); } if (svcId >= 0) { celixThreadMutex_lock(&tracker->mutex);
