celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1658314 - in /celix/trunk/remote_services: discovery/private/src/endpoint_discovery_poller.c discovery_shm/private/include/discovery.h
Date Mon, 09 Feb 2015 07:03:27 GMT
Author: bpetri
Date: Mon Feb  9 07:03:27 2015
New Revision: 1658314

URL: http://svn.apache.org/r1658314
Log:

CELIX-217, CELIX-119: removed apr, integrated discovery-server


Removed:
    celix/trunk/remote_services/discovery_shm/private/include/discovery.h
Modified:
    celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c

Modified: celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c?rev=1658314&r1=1658313&r2=1658314&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c (original)
+++ celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c Mon Feb
 9 07:03:27 2015
@@ -153,6 +153,25 @@ celix_status_t endpointDiscoveryPoller_d
 	return status;
 }
 
+
+celix_status_t endpointDiscoveryPoller_getDiscoveryEndpoints(endpoint_discovery_poller_pt
poller, array_list_pt urls) {
+    celixThreadMutex_lock(&(poller)->pollerLock);
+
+    hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+
+    while(hashMapIterator_hasNext(iterator))  {
+        hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+        char* toAdd = strdup((char*) hashMapEntry_getKey(entry));
+        arrayList_add(urls, toAdd);
+    }
+
+    hashMapIterator_destroy(iterator);
+
+    celixThreadMutex_unlock(&(poller)->pollerLock);
+
+    return CELIX_SUCCESS;
+}
+
 /**
  * Adds a new endpoint URL to the list of polled endpoints.
  */



Mime
View raw message