You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/10/12 09:03:45 UTC
[28/34] celix git commit: CELIX-454: Moves a debug log statement so
that it only occurs when new endpoint are discovered
CELIX-454: Moves a debug log statement so that it only occurs when new endpoint are discovered
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/535bb882
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/535bb882
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/535bb882
Branch: refs/heads/develop
Commit: 535bb882401d0cbeae49f14906a66abb186b02bf
Parents: 1a26edb
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Oct 10 21:36:08 2018 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Oct 10 21:36:08 2018 +0200
----------------------------------------------------------------------
.../src/pubsub_discovery_impl.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/535bb882/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
----------------------------------------------------------------------
diff --git a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
index b6ba67a..dfe8fa8 100644
--- a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
+++ b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
@@ -459,21 +459,21 @@ static void pubsub_discovery_addDiscoveredEndpoint(pubsub_discovery_t *disc, cel
return;
}
- if (disc->verbose) {
- const char *uuid = celix_properties_get(endpoint, PUBSUB_ENDPOINT_UUID, "!Error!");
- const char *type = celix_properties_get(endpoint, PUBSUB_ENDPOINT_TYPE, "!Error!");
- const char *admin = celix_properties_get(endpoint, PUBSUB_ENDPOINT_ADMIN_TYPE, "!Error!");
- const char *ser = celix_properties_get(endpoint, PUBSUB_SERIALIZER_TYPE_KEY, "!Error!");
- printf("[PSD] Adding discovered endpoint %s. type is %s, admin is %s, serializer is %s.\n",
- uuid, type, admin, ser);
- }
-
celixThreadMutex_lock(&disc->discoveredEndpointsMutex);
bool exists = hashMap_containsKey(disc->discoveredEndpoints, (void*)uuid);
hashMap_put(disc->discoveredEndpoints, (void*)uuid, endpoint);
celixThreadMutex_unlock(&disc->discoveredEndpointsMutex);
if (!exists) {
+ if (disc->verbose) {
+ const char *uuid = celix_properties_get(endpoint, PUBSUB_ENDPOINT_UUID, "!Error!");
+ const char *type = celix_properties_get(endpoint, PUBSUB_ENDPOINT_TYPE, "!Error!");
+ const char *admin = celix_properties_get(endpoint, PUBSUB_ENDPOINT_ADMIN_TYPE, "!Error!");
+ const char *ser = celix_properties_get(endpoint, PUBSUB_SERIALIZER_TYPE_KEY, "!Error!");
+ printf("[PSD] Adding discovered endpoint %s. type is %s, admin is %s, serializer is %s.\n",
+ uuid, type, admin, ser);
+ }
+
celixThreadMutex_lock(&disc->discoveredEndpointsListenersMutex);
hash_map_iterator_t iter = hashMapIterator_construct(disc->discoveredEndpointsListeners);
while (hashMapIterator_hasNext(&iter)) {
@@ -627,4 +627,4 @@ celix_status_t pubsub_discovery_executeCommand(void *handle, char * commandLine
celixThreadMutex_unlock(&disc->announcedEndpointsMutex);
return CELIX_SUCCESS;
-}
\ No newline at end of file
+}