You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by bp...@apache.org on 2015/09/28 12:02:46 UTC
[01/19] celix git commit: CELIX-248: fix too many arguments in sprintf
Repository: celix
Updated Branches:
refs/heads/feature/CELIX-247_android_support 9163e76ed -> 70ccd0bb2
CELIX-248: fix too many arguments in sprintf
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/57a15781
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/57a15781
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/57a15781
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 57a1578108c0f644412a018641ea344679f49241
Parents: 654f425
Author: Bjoern Petri <bp...@apache.org>
Authored: Wed Jul 15 20:17:00 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Wed Jul 15 20:17:00 2015 +0200
----------------------------------------------------------------------
deployment_admin/private/src/deployment_admin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/57a15781/deployment_admin/private/src/deployment_admin.c
----------------------------------------------------------------------
diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c
index 8c81b59..9f29866 100644
--- a/deployment_admin/private/src/deployment_admin.c
+++ b/deployment_admin/private/src/deployment_admin.c
@@ -583,7 +583,7 @@ celix_status_t deploymentAdmin_processDeploymentPackageResources(deployment_admi
int length = strlen(entry) + strlen(name) + strlen(info->path) + 7;
char resourcePath[length];
- snprintf(resourcePath, length, "%srepo/%s/%s", entry, name, info->path, NULL);
+ snprintf(resourcePath, length, "%srepo/%s/%s", entry, name, info->path);
deploymentPackage_getName(source, &packageName);
processor->begin(processor->processor, packageName);
[18/19] celix git commit: CELIX-247: Updated docker file.
Posted by bp...@apache.org.
CELIX-247: Updated docker file.
- Moved building from RUN to CMD to reflect that this is a celix-builder container not a celix container
- Added ALv2 comment
- Added some howto documentation in the DockerFile
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/51f82007
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/51f82007
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/51f82007
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 51f8200787518441eb4bd13a6c829eee8fff306e
Parents: 95a23a1
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jul 9 14:29:35 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Sep 28 12:01:18 2015 +0200
----------------------------------------------------------------------
Dockerfile | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/51f82007/Dockerfile
----------------------------------------------------------------------
diff --git a/Dockerfile b/Dockerfile
index 1e9f5eb..6f4f1d5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,18 @@
-FROM ubuntu:14.04
+#
+# Licensed under Apache License v2. See LICENSE for more information.
+#
+
+# Celix android builder
+#
+# Howto:
+# Build docker image -> docker build -t celix-android-builder <path-to-this-dockerfile>
+# Run docker image -> docker run --name builder celix-android-builder
+# Extract filesystem -> docker export builder > fs.tar
+# Extract /build dir from tar -> tar xf fs.tar build/output/celix
+#
+#
+FROM ubuntu:14.04
MAINTAINER Bjoern Petri <bj...@sundevil.de>
ENV ARCH armv7
@@ -91,9 +104,11 @@ RUN curl -L -O http://xmlsoft.org/sources/libxml2-2.7.2.tar.gz && \
make && make install
-# finally celix
-
-RUN git clone https://github.com/apache/celix.git --single-branch --branch feature/CELIX-247_android_support celix && mkdir celix/build && cd celix/build && cmake -DANDROID=TRUE -DBUILD_EXAMPLES=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_RSA_TOPOLOGY_MANAGER=ON -DJANSSON_LIBRARY=/build/output/jansson/lib/libjansson.a -DJANSSON_INCLUDE_DIR=/build/output/jansson/include -DCURL_LIBRARY=/build/output/curl/lib/libcurl.a -DCURL_INCLUDE_DIR=/build/output/curl/include -DLIBXML2_LIBRARIES=/build/output/libxml2/lib/libxml2.a -DLIBXML2_INCLUDE_DIR=/build/output/libxml2/include/libxml2 -DZLIB_LIBRARY=/build/output/zlib/lib/libz.a -DZLIB_INCLUDE_DIR=/build/output/zlib/include -DUUID_LIBRARY=/build/output/uuid/lib/libuuid.a -DUUID_INCLUDE_DIR=/build/output/uuid/include -DCMAKE_INSTALL_PREFIX:PATH=/build/output/celix .. && make && make install
+# finally add celix src
+ADD . celix
+#Or do git clone -> RUN git clone https://github.com/apache/celix.git celix
+CMD mkdir -p celix/build-android && cd celix/build-android && cmake -DANDROID=TRUE -DBUILD_EXAMPLES=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_RSA_TOPOLOGY_MANAGER=ON -DJANSSON_LIBRARY=/build/output/jansson/lib/libjansson.a -DJANSSON_INCLUDE_DIR=/build/output/jansson/include -DCURL_LIBRARY=/build/output/curl/lib/libcurl.a -DCURL_INCLUDE_DIR=/build/output/curl/include -DLIBXML2_LIBRARIES=/build/output/libxml2/lib/libxml2.a -DLIBXML2_INCLUDE_DIR=/build/output/libxml2/include/libxml2 -DZLIB_LIBRARY=/build/output/zlib/lib/libz.a -DZLIB_INCLUDE_DIR=/build/output/zlib/include -DUUID_LIBRARY=/build/output/uuid/lib/libuuid.a -DUUID_INCLUDE_DIR=/build/output/uuid/include -DCMAKE_INSTALL_PREFIX:PATH=/build/output/celix .. && make && make install-all
# done
+
[16/19] celix git commit: CELIX-260: added missing uuid includes
Posted by bp...@apache.org.
CELIX-260: added missing uuid includes
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a72cd6f5
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a72cd6f5
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a72cd6f5
Branch: refs/heads/feature/CELIX-247_android_support
Commit: a72cd6f5b9716aef7f0b032b60a29d0479a2e4ff
Parents: 268ab02
Author: Bjoern Petri <bp...@apache.org>
Authored: Mon Sep 28 11:39:13 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Sep 28 11:39:13 2015 +0200
----------------------------------------------------------------------
deployment_admin/CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/a72cd6f5/deployment_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/deployment_admin/CMakeLists.txt b/deployment_admin/CMakeLists.txt
index cff425d..1f18ae2 100644
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@ -18,7 +18,8 @@
celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" ON DEPS framework launcher shell_tui log_writer)
if (DEPLOYMENT_ADMIN)
- find_package(CURL REQUIRED)
+ find_package(CURL REQUIRED)
+ find_package(UUID REQUIRED)
add_definitions(-DUSE_FILE32API)
@@ -27,6 +28,7 @@ if (DEPLOYMENT_ADMIN)
SET_HEADERS("Bundle-Name: Apache Celix Deployment Admin")
include_directories("${CURL_INCLUDE_DIR}")
+ include_directories("${UUID_INCLUDE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/private/include")
include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/public/include")
@@ -58,5 +60,5 @@ if (DEPLOYMENT_ADMIN)
public/include/resource_processor.h
)
- target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
+ target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES} ${UUID_LIBRARY})
endif (DEPLOYMENT_ADMIN)
[05/19] celix git commit: CELIX-252: added separate hashmap to
double-check whether expired key belongs to imported services
Posted by bp...@apache.org.
CELIX-252: added separate hashmap to double-check whether expired key belongs to imported services
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/c396aeed
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/c396aeed
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/c396aeed
Branch: refs/heads/feature/CELIX-247_android_support
Commit: c396aeed17b7618d5b2109a7a83f0c4213ce70f3
Parents: f32a233
Author: Bjoern Petri <bp...@apache.org>
Authored: Sun Aug 23 21:42:50 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Sun Aug 23 21:42:50 2015 +0200
----------------------------------------------------------------------
.../discovery_etcd/private/include/etcd.h | 2 +-
.../discovery_etcd/private/src/etcd.c | 135 ++++++++++---------
.../discovery_etcd/private/src/etcd_watcher.c | 69 ++++++++--
3 files changed, 136 insertions(+), 70 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/c396aeed/remote_services/discovery_etcd/private/include/etcd.h
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/private/include/etcd.h b/remote_services/discovery_etcd/private/include/etcd.h
index e36fccb..f5624d0 100644
--- a/remote_services/discovery_etcd/private/include/etcd.h
+++ b/remote_services/discovery_etcd/private/include/etcd.h
@@ -54,6 +54,6 @@ bool etcd_get(char* key, char* value, char*action, int* modifiedIndex);
bool etcd_getNodes(char* directory, char** nodeNames, int* size);
bool etcd_set(char* key, char* value, int ttl, bool prevExist);
bool etcd_del(char* key);
-bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value);
+bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value, char* rkey, int *modifiedIndex);
#endif /* ETCD_H_ */
http://git-wip-us.apache.org/repos/asf/celix/blob/c396aeed/remote_services/discovery_etcd/private/src/etcd.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/private/src/etcd.c b/remote_services/discovery_etcd/private/src/etcd.c
index 2c74856..d38f6bd 100644
--- a/remote_services/discovery_etcd/private/src/etcd.c
+++ b/remote_services/discovery_etcd/private/src/etcd.c
@@ -304,66 +304,79 @@ bool etcd_del(char* key) {
}
///watch
-bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value) {
- json_error_t error;
- json_t* js_root = NULL;
- json_t* js_node = NULL;
- json_t* js_prevNode = NULL;
- json_t* js_action = NULL;
- json_t* js_value = NULL;
- json_t* js_prevValue = NULL;
- bool retVal = false;
- char url[MAX_URL_LENGTH];
- int res;
- struct MemoryStruct reply;
-
- reply.memory = malloc(1); /* will be grown as needed by the realloc above */
- reply.size = 0; /* no data at this point */
- if (index != 0)
- snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true&waitIndex=%d", etcd_server, etcd_port, key,
- index);
- else
- snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true", etcd_server, etcd_port, key);
-
- res = performRequest(url, GET, WriteMemoryCallback, NULL, (void*) &reply);
-
- if (res == CURLE_OK) {
- js_root = json_loads(reply.memory, 0, &error);
-
- if (js_root != NULL) {
- js_action = json_object_get(js_root, ETCD_JSON_ACTION);
- js_node = json_object_get(js_root, ETCD_JSON_NODE);
- js_prevNode = json_object_get(js_root, ETCD_JSON_PREVNODE);
- }
- if (js_prevNode != NULL) {
- js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
- }
- if (js_node != NULL) {
- js_value = json_object_get(js_node, ETCD_JSON_VALUE);
- }
- if (js_prevNode != NULL) {
- js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
- }
- if ((js_prevValue != NULL) && (json_is_string(js_prevValue))) {
- strncpy(prevValue, json_string_value(js_prevValue), MAX_VALUE_LENGTH);
- }
- if ((js_value != NULL) && (json_is_string(js_value))) {
- strncpy(value, json_string_value(js_value), MAX_VALUE_LENGTH);
- }
- if ((js_action != NULL) && (json_is_string(js_action))) {
- strncpy(action, json_string_value(js_action), MAX_ACTION_LENGTH);
-
- retVal = true;
- }
- if (js_root != NULL) {
- json_decref(js_root);
- }
- }
-
- if (reply.memory) {
- free(reply.memory);
- }
-
- return retVal;
+bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value, char* rkey, int* modifiedIndex) {
+ json_error_t error;
+ json_t* js_root = NULL;
+ json_t* js_node = NULL;
+ json_t* js_prevNode = NULL;
+ json_t* js_action = NULL;
+ json_t* js_value = NULL;
+ json_t* js_rkey = NULL;
+ json_t* js_prevValue = NULL;
+ json_t* js_modIndex = NULL;
+ bool retVal = false;
+ char url[MAX_URL_LENGTH];
+ int res;
+ struct MemoryStruct reply;
+
+ reply.memory = malloc(1); /* will be grown as needed by the realloc above */
+ reply.size = 0; /* no data at this point */
+
+ if (index != 0)
+ snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true&waitIndex=%d", etcd_server, etcd_port, key, index);
+ else
+ snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true", etcd_server, etcd_port, key);
+
+ res = performRequest(url, GET, WriteMemoryCallback, NULL, (void*) &reply);
+
+ if (res == CURLE_OK) {
+
+ js_root = json_loads(reply.memory, 0, &error);
+
+ if (js_root != NULL) {
+ js_action = json_object_get(js_root, ETCD_JSON_ACTION);
+ js_node = json_object_get(js_root, ETCD_JSON_NODE);
+ js_prevNode = json_object_get(js_root, ETCD_JSON_PREVNODE);
+ }
+ if (js_prevNode != NULL) {
+ js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
+ }
+ if (js_node != NULL) {
+ js_rkey = json_object_get(js_node, ETCD_JSON_KEY);
+ js_value = json_object_get(js_node, ETCD_JSON_VALUE);
+ js_modIndex = json_object_get(js_node, ETCD_JSON_MODIFIEDINDEX);
+ }
+ if (js_prevNode != NULL) {
+ js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
+ }
+ if ((js_prevValue != NULL) && (json_is_string(js_prevValue))) {
+ strncpy(prevValue, json_string_value(js_prevValue), MAX_VALUE_LENGTH);
+ }
+ if ((js_value != NULL) && (json_is_string(js_value))) {
+ strncpy(value, json_string_value(js_value), MAX_VALUE_LENGTH);
+ }
+ if ((js_modIndex != NULL) && (json_is_integer(js_modIndex))) {
+ *modifiedIndex = json_integer_value(js_modIndex);
+ } else {
+ *modifiedIndex = index;
+ }
+
+ if ((js_rkey != NULL) && (js_action != NULL) && (json_is_string(js_rkey)) && (json_is_string(js_action))) {
+ strncpy(rkey, json_string_value(js_rkey), MAX_KEY_LENGTH);
+ strncpy(action, json_string_value(js_action), MAX_ACTION_LENGTH);
+
+ retVal = true;
+ }
+ if (js_root != NULL) {
+ json_decref(js_root);
+ }
+
+ }
+
+ if (reply.memory) {
+ free(reply.memory);
+ }
+
+ return retVal;
}
http://git-wip-us.apache.org/repos/asf/celix/blob/c396aeed/remote_services/discovery_etcd/private/src/etcd_watcher.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/private/src/etcd_watcher.c b/remote_services/discovery_etcd/private/src/etcd_watcher.c
index eefd28f..89be84e 100644
--- a/remote_services/discovery_etcd/private/src/etcd_watcher.c
+++ b/remote_services/discovery_etcd/private/src/etcd_watcher.c
@@ -31,6 +31,7 @@
#include "log_helper.h"
#include "log_service.h"
#include "constants.h"
+#include "utils.h"
#include "discovery.h"
#include "discovery_impl.h"
@@ -42,6 +43,7 @@
struct etcd_watcher {
discovery_pt discovery;
log_helper_pt* loghelper;
+ hash_map_pt entries;
celix_thread_mutex_t watcherLock;
celix_thread_t watcherThread;
@@ -200,6 +202,52 @@ static celix_status_t etcdWatcher_addOwnFramework(etcd_watcher_pt watcher)
return status;
}
+
+
+
+static celix_status_t etcdWatcher_addEntry(etcd_watcher_pt watcher, char* key, char* value) {
+ celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+ endpoint_discovery_poller_pt poller = watcher->discovery->poller;
+
+ if (!hashMap_containsKey(watcher->entries, key)) {
+ status = endpointDiscoveryPoller_addDiscoveryEndpoint(poller, value);
+
+ if (status == CELIX_SUCCESS) {
+ hashMap_put(watcher->entries, key, value);
+ }
+ }
+
+ return status;
+}
+
+
+static celix_status_t etcdWatcher_removeEntry(etcd_watcher_pt watcher, char* key, char* value) {
+ celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+ endpoint_discovery_poller_pt poller = watcher->discovery->poller;
+
+ if (hashMap_containsKey(watcher->entries, key)) {
+
+ hashMap_remove(watcher->entries, key);
+
+ // check if there is another entry with the same value
+ hash_map_iterator_pt iter = hashMapIterator_create(watcher->entries);
+ unsigned int valueFound = 0;
+
+ while (hashMapIterator_hasNext(iter) && valueFound <= 1) {
+ if (strcmp(value, hashMapIterator_nextValue(iter)) == 0)
+ valueFound++;
+ }
+
+ if (valueFound == 0)
+ status = endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, value);
+
+ }
+
+ return status;
+
+}
+
+
/*
* performs (blocking) etcd_watch calls to check for
* changing discovery endpoint information within etcd.
@@ -211,29 +259,32 @@ static void* etcdWatcher_run(void* data) {
int highestModified = 0;
bundle_context_pt context = watcher->discovery->context;
- endpoint_discovery_poller_pt poller = watcher->discovery->poller;
etcdWatcher_addAlreadyExistingWatchpoints(watcher->discovery, &highestModified);
etcdWatcher_getRootPath(context, &rootPath[0]);
while (watcher->running) {
+
+ char rkey[MAX_KEY_LENGTH];
char value[MAX_VALUE_LENGTH];
char preValue[MAX_VALUE_LENGTH];
char action[MAX_ACTION_LENGTH];
+ int modIndex;
- if (etcd_watch(rootPath, highestModified+1, &action[0], &preValue[0], &value[0]) == true) {
+ if (etcd_watch(rootPath, highestModified + 1, &action[0], &preValue[0], &value[0], &rkey[0], &modIndex) == true) {
if (strcmp(action, "set") == 0) {
- endpointDiscoveryPoller_addDiscoveryEndpoint(poller, strdup(&value[0]));
+ etcdWatcher_addEntry(watcher, &rkey[0], &value[0]);
} else if (strcmp(action, "delete") == 0) {
- endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
+ etcdWatcher_removeEntry(watcher, &rkey[0], &value[0]);
} else if (strcmp(action, "expire") == 0) {
- endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
+ etcdWatcher_removeEntry(watcher, &rkey[0], &value[0]);
} else if (strcmp(action, "update") == 0) {
- // TODO
+ etcdWatcher_addEntry(watcher, &rkey[0], &value[0]);
} else {
logHelper_log(*watcher->loghelper, OSGI_LOGSERVICE_INFO, "Unexpected action: %s", action);
}
- highestModified++;
+
+ highestModified = modIndex;
}
// update own framework uuid
@@ -263,7 +314,6 @@ celix_status_t etcdWatcher_create(discovery_pt discovery, bundle_context_pt cont
return CELIX_BUNDLE_EXCEPTION;
}
-
(*watcher) = calloc(1, sizeof(struct etcd_watcher));
if (!*watcher) {
return CELIX_ENOMEM;
@@ -272,6 +322,7 @@ celix_status_t etcdWatcher_create(discovery_pt discovery, bundle_context_pt cont
{
(*watcher)->discovery = discovery;
(*watcher)->loghelper = &discovery->loghelper;
+ (*watcher)->entries = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
}
if ((bundleContext_getProperty(context, CFG_ETCD_SERVER_IP, &etcd_server) != CELIX_SUCCESS) || !etcd_server) {
@@ -338,6 +389,8 @@ celix_status_t etcdWatcher_destroy(etcd_watcher_pt watcher) {
watcher->loghelper = NULL;
+ hashMap_destroy(watcher->entries, true, true);
+
free(watcher);
return status;
[11/19] celix git commit: CELIX-255: BUILD_UTILS default to ON
instead of OFF
Posted by bp...@apache.org.
CELIX-255: BUILD_UTILS default to ON instead of OFF
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/10944465
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/10944465
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/10944465
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 1094446526b7df47d332933a16dd8f7fbeb1de15
Parents: e0a5195
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Sep 1 16:42:18 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Sep 1 16:42:18 2015 +0200
----------------------------------------------------------------------
utils/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/10944465/utils/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index a6b2f4f..bb27a0c 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(UTILS "Option to build the utilities library" "OFF")
+celix_subproject(UTILS "Option to build the utilities library" ON)
if (UTILS)
cmake_minimum_required(VERSION 2.6)
[15/19] celix git commit: CELIX-259: added dispatcherThread shutdown
Posted by bp...@apache.org.
CELIX-259: added dispatcherThread shutdown
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/268ab022
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/268ab022
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/268ab022
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 268ab022e08adaa6011785a9cac6b36c958f670a
Parents: 7e3b33f
Author: Bjoern Petri <bp...@apache.org>
Authored: Fri Sep 25 19:48:27 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Fri Sep 25 19:48:27 2015 +0200
----------------------------------------------------------------------
framework/private/src/framework.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/268ab022/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index e0391e7..529a712 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -2066,10 +2066,23 @@ static void *framework_shutdown(void *framework) {
bundle_close(bundle);
}
hashMapIterator_destroy(iter);
-#ifndef ANDROID
- pthread_cancel(fw->dispatcherThread.thread);
-#endif
- celixThread_join(fw->dispatcherThread, NULL);
+
+ if (celixThreadMutex_lock(&fw->dispatcherLock) != CELIX_SUCCESS) {
+ fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error locking the dispatcherThread.");
+ }
+ else {
+ fw->shutdown = true;
+
+ if (celixThreadCondition_broadcast(&fw->dispatcher)) {
+ fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error broadcasting .");
+ }
+
+ if (celixThreadMutex_unlock(&fw->dispatcherLock)) {
+ fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error unlocking the dispatcherThread.");
+ }
+
+ celixThread_join(fw->dispatcherThread, NULL);
+ }
err = celixThreadMutex_lock(&fw->mutex);
if (err != 0) {
@@ -2077,7 +2090,6 @@ static void *framework_shutdown(void *framework) {
celixThread_exit(NULL);
return NULL;
}
- fw->shutdown = true;
err = celixThreadCondition_broadcast(&fw->shutdownGate);
if (err != 0) {
fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error waking the shutdown gate, cannot exit clean.");
[17/19] celix git commit: CELIX-247: Added Dockerfile for
cross-compiling celix
Posted by bp...@apache.org.
CELIX-247: Added Dockerfile for cross-compiling celix
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/95a23a16
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/95a23a16
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/95a23a16
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 95a23a16394a7128736988ed294e9d0d533d2714
Parents: a72cd6f
Author: Bjoern Petri <bp...@apache.org>
Authored: Thu Jul 9 12:50:47 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Sep 28 12:01:18 2015 +0200
----------------------------------------------------------------------
Dockerfile | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/95a23a16/Dockerfile
----------------------------------------------------------------------
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..1e9f5eb
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,99 @@
+FROM ubuntu:14.04
+
+MAINTAINER Bjoern Petri <bj...@sundevil.de>
+
+ENV ARCH armv7
+ENV PLATFORM android-18
+ENV ANDROID_STANDALONE_TOOLCHAIN /build/toolchain-arm
+ENV ANDROID_CMAKE_HOME /build/resources/android-cmake
+ENV SYSROOT $ANDROID_STANDALONE_TOOLCHAIN/sysroot
+ENV PATH $ANDROID_STANDALONE_TOOLCHAIN/bin:$ANDROID_STANDALONE_TOOLCHAIN/usr/local/bin:$PATH
+ENV PATH $PATH:/build/resources/android-ndk-r10e
+ENV CROSS_COMPILE arm-linux-androideabi
+ENV CC arm-linux-androideabi-gcc
+ENV CCX arm-linux-androideabi-g++
+ENV AR arm-linux-androideabi-ar
+ENV AS arm-linux-androideabi-as
+ENV LD arm-linux-androideabi-ld
+ENV RANLIB arm-linux-androideabi-ranlib
+ENV NM arm-linux-androideabi-nm
+ENV STRIP arm-linux-androideabi-strip
+ENV CHOST arm-linux-androideabi
+
+# install needed tools
+
+RUN apt-get update && apt-get install -y \
+ automake \
+ build-essential \
+ wget \
+ p7zip-full \
+ bash \
+ curl \
+ cmake \
+ git
+
+
+RUN mkdir -p build/output
+
+WORKDIR /build/resources
+
+
+# Extracting ndk/sdk
+# create standalone toolchain
+RUN curl -L -O http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin && \
+ chmod a+x android-ndk-r10e-linux-x86_64.bin && \
+ 7z x android-ndk-r10e-linux-x86_64.bin && \
+ bash android-ndk-r10e/build/tools/make-standalone-toolchain.sh --verbose --platform=$PLATFORM --install-dir=$ANDROID_STANDALONE_TOOLCHAIN --arch=arm --toolchain=arm-linux-androideabi-4.9 --system=linux-x86_64
+
+
+
+# uuid
+
+RUN curl -L -O http://downloads.sourceforge.net/libuuid/libuuid-1.0.3.tar.gz && \
+ tar -xvzf libuuid-1.0.3.tar.gz && \
+ cd libuuid-1.0.3 && \
+ ./configure --host=arm-linux-androideabi --disable-shared --enable-static --prefix=/build/output/uuid && \
+ make && make install
+
+
+# zlib
+
+RUN curl -L -O http://zlib.net/zlib-1.2.8.tar.gz && \
+ tar -xvzf zlib-1.2.8.tar.gz && \
+ cd zlib-1.2.8 && \
+ ./configure --prefix=/build/output/zlib && make && make install
+
+# curl
+
+RUN curl -L -O http://curl.haxx.se/download/curl-7.38.0.tar.gz && \
+ tar -xvzf curl-7.38.0.tar.gz && \
+ cd curl-7.38.0 && \
+ ./configure --host=arm-linux-androideabi --disable-shared --enable-static --disable-dependency-tracking --with-zlib=`pwd`/../../output/zlib --without-ca-bundle --without-ca-path --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-sspi --disable-manual --target=arm-linux-androideabi --build=x86_64-unknown-linux-gnu --prefix=/build/output/curl && \
+ make && make install
+
+# jansson
+RUN curl -L -O http://www.digip.org/jansson/releases/jansson-2.4.tar.bz2 && \
+ tar -xvjf jansson-2.4.tar.bz2 && \
+ cd jansson-2.4 && ./configure --host=arm-linux-androideabi --disable-shared --enable-static --prefix=/build/output/jansson && \
+ make && make install
+
+
+# libmxl2
+
+RUN curl -L -O http://xmlsoft.org/sources/libxml2-2.7.2.tar.gz && \
+ curl -L -O https://raw.githubusercontent.com/bpetri/libxml2_android/master/config.guess && \
+ curl -L -O https://raw.githubusercontent.com/bpetri/libxml2_android/master/config.sub && \
+ curl -L -O https://raw.githubusercontent.com/bpetri/libxml2_android/master/libxml2.patch && \
+ tar -xvzf libxml2-2.7.2.tar.gz && cp config.guess config.sub libxml2-2.7.2 && \
+ patch -p1 < libxml2.patch && \
+ cd libxml2-2.7.2 && \
+ ./configure --host=arm-linux-androideabi --disable-shared --enable-static --prefix=/build/output/libxml2 && \
+ make && make install
+
+
+# finally celix
+
+RUN git clone https://github.com/apache/celix.git --single-branch --branch feature/CELIX-247_android_support celix && mkdir celix/build && cd celix/build && cmake -DANDROID=TRUE -DBUILD_EXAMPLES=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_RSA_TOPOLOGY_MANAGER=ON -DJANSSON_LIBRARY=/build/output/jansson/lib/libjansson.a -DJANSSON_INCLUDE_DIR=/build/output/jansson/include -DCURL_LIBRARY=/build/output/curl/lib/libcurl.a -DCURL_INCLUDE_DIR=/build/output/curl/include -DLIBXML2_LIBRARIES=/build/output/libxml2/lib/libxml2.a -DLIBXML2_INCLUDE_DIR=/build/output/libxml2/include/libxml2 -DZLIB_LIBRARY=/build/output/zlib/lib/libz.a -DZLIB_INCLUDE_DIR=/build/output/zlib/include -DUUID_LIBRARY=/build/output/uuid/lib/libuuid.a -DUUID_INCLUDE_DIR=/build/output/uuid/include -DCMAKE_INSTALL_PREFIX:PATH=/build/output/celix .. && make && make install
+
+
+# done
[12/19] celix git commit: CELIX-257: refactored to allow endpoint
poll when adding a new url
Posted by bp...@apache.org.
CELIX-257: refactored to allow endpoint poll when adding a new url
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fad8ca25
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fad8ca25
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fad8ca25
Branch: refs/heads/feature/CELIX-247_android_support
Commit: fad8ca259b62ebaf7baa45103c8f418ab179f7d8
Parents: 1094446
Author: Bjoern Petri <bp...@apache.org>
Authored: Tue Sep 15 09:21:59 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Tue Sep 15 09:21:59 2015 +0200
----------------------------------------------------------------------
.../private/src/endpoint_discovery_poller.c | 114 ++++++++++---------
1 file changed, 63 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/fad8ca25/remote_services/discovery/private/src/endpoint_discovery_poller.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery/private/src/endpoint_discovery_poller.c b/remote_services/discovery/private/src/endpoint_discovery_poller.c
index ae269cf..ac819c5 100644
--- a/remote_services/discovery/private/src/endpoint_discovery_poller.c
+++ b/remote_services/discovery/private/src/endpoint_discovery_poller.c
@@ -43,7 +43,9 @@
#define DISCOVERY_POLL_INTERVAL "DISCOVERY_CFG_POLL_INTERVAL"
#define DEFAULT_POLL_INTERVAL "10"
-static void *endpointDiscoveryPoller_poll(void *data);
+
+static void *endpointDiscoveryPoller_performPeriodicPoll(void *data);
+celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt poller, char *url, array_list_pt currentEndpoints);
static celix_status_t endpointDiscoveryPoller_getEndpoints(endpoint_discovery_poller_pt poller, char *url, array_list_pt *updatedEndpoints);
static celix_status_t endpointDiscoveryPoller_endpointDescriptionEquals(void *endpointPtr, void *comparePtr, bool *equals);
@@ -99,7 +101,7 @@ celix_status_t endpointDiscoveryPoller_create(discovery_pt discovery, bundle_con
return CELIX_BUNDLE_EXCEPTION;
}
- status = celixThread_create(&(*poller)->pollerThread, NULL, endpointDiscoveryPoller_poll, *poller);
+ status = celixThread_create(&(*poller)->pollerThread, NULL, endpointDiscoveryPoller_performPeriodicPoll, *poller);
if (status != CELIX_SUCCESS) {
return status;
}
@@ -187,6 +189,7 @@ celix_status_t endpointDiscoveryPoller_addDiscoveryEndpoint(endpoint_discovery_p
if (status == CELIX_SUCCESS) {
logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: add new discovery endpoint with url %s", url);
hashMap_put(poller->entries, strdup(url), endpoints);
+ endpointDiscoveryPoller_poll(poller, url, endpoints);
}
}
@@ -234,80 +237,89 @@ celix_status_t endpointDiscoveryPoller_removeDiscoveryEndpoint(endpoint_discover
return status;
}
-static void *endpointDiscoveryPoller_poll(void *data) {
- endpoint_discovery_poller_pt poller = (endpoint_discovery_poller_pt) data;
- useconds_t interval = (useconds_t) (poller->poll_interval * 1000000L);
- while (poller->running) {
- usleep(interval);
- celix_status_t status = celixThreadMutex_lock(&poller->pollerLock);
- if (status != CELIX_SUCCESS) {
- logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
- continue;
- }
+celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt poller, char *url, array_list_pt currentEndpoints) {
+ celix_status_t status = NULL;
+ array_list_pt updatedEndpoints = NULL;
- hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+ // create an arraylist with a custom equality test to ensure we can find endpoints properly...
+ arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
+ status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
- while (hashMapIterator_hasNext(iterator)) {
- hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+ if (status != CELIX_SUCCESS) {
+ status = celixThreadMutex_unlock(&poller->pollerLock);
+ } else {
+ if (updatedEndpoints) {
+ for (unsigned int i = arrayList_size(currentEndpoints); i > 0; i--) {
+ endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i - 1);
+
+ if (!arrayList_contains(updatedEndpoints, endpoint)) {
+ status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+ arrayList_remove(currentEndpoints, i - 1);
+ endpointDescription_destroy(endpoint);
+ }
+ }
- char *url = hashMapEntry_getKey(entry);
- array_list_pt currentEndpoints = hashMapEntry_getValue(entry);
+ for (int i = arrayList_size(updatedEndpoints); i > 0; i--) {
+ endpoint_description_pt endpoint = arrayList_remove(updatedEndpoints, 0);
- array_list_pt updatedEndpoints = NULL;
- // create an arraylist with a custom equality test to ensure we can find endpoints properly...
- arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
- status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
+ if (!arrayList_contains(currentEndpoints, endpoint)) {
+ arrayList_add(currentEndpoints, endpoint);
+ status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
+ } else {
+ endpointDescription_destroy(endpoint);
- if (status != CELIX_SUCCESS) {
- status = celixThreadMutex_unlock(&poller->pollerLock);
- continue;
+ }
}
+ }
- if (updatedEndpoints) {
- for (unsigned int i = arrayList_size(currentEndpoints); i > 0 ; i--) {
- endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i-1);
+ if (updatedEndpoints) {
+ arrayList_destroy(updatedEndpoints);
+ }
+ }
- if (!arrayList_contains(updatedEndpoints, endpoint)) {
- status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
- arrayList_remove(currentEndpoints, i-1);
- endpointDescription_destroy(endpoint);
- }
- }
+ return status;
+}
- for (int i = arrayList_size(updatedEndpoints); i > 0 ; i--) {
- endpoint_description_pt endpoint = arrayList_remove(updatedEndpoints, 0);
+static void *endpointDiscoveryPoller_performPeriodicPoll(void *data) {
+ endpoint_discovery_poller_pt poller = (endpoint_discovery_poller_pt) data;
- if (!arrayList_contains(currentEndpoints, endpoint)) {
- arrayList_add(currentEndpoints, endpoint);
- status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
- }
- else {
- endpointDescription_destroy(endpoint);
+ useconds_t interval = (useconds_t) (poller->poll_interval * 1000000L);
- }
- }
- }
+ while (poller->running) {
+ usleep(interval);
+ celix_status_t status = celixThreadMutex_lock(&poller->pollerLock);
+
+ if (status != CELIX_SUCCESS) {
+ logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
+ } else {
+ hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+
+ while (hashMapIterator_hasNext(iterator)) {
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+
+ char *url = hashMapEntry_getKey(entry);
+ array_list_pt currentEndpoints = hashMapEntry_getValue(entry);
- if (updatedEndpoints) {
- arrayList_destroy(updatedEndpoints);
+ endpointDiscoveryPoller_poll(poller, url, currentEndpoints);
}
+ hashMapIterator_destroy(iterator);
}
- hashMapIterator_destroy(iterator);
-
status = celixThreadMutex_unlock(&poller->pollerLock);
if (status != CELIX_SUCCESS) {
logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to release lock; retrying...");
}
- }
+ }
- return NULL;
+ return NULL;
}
+
+
struct MemoryStruct {
char *memory;
size_t size;
@@ -366,7 +378,7 @@ static celix_status_t endpointDiscoveryPoller_getEndpoints(endpoint_discovery_po
endpointDescriptorReader_destroy(reader);
}
} else {
- logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_ERROR, "ENDPOINT_POLLER: unable to read endpoints, reason: %s", curl_easy_strerror(res));
+ logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_ERROR, "ENDPOINT_POLLER: unable to read endpoints from %s, reason: %s", url, curl_easy_strerror(res));
}
// clean up endpoints file
[09/19] celix git commit: CELIX-254: Applied mem leak patch for
deployment_admin
Posted by bp...@apache.org.
CELIX-254: Applied mem leak patch for deployment_admin
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/5c5a0ebc
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/5c5a0ebc
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/5c5a0ebc
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 5c5a0ebc575cc103a65bd4cdcee4bca3204b75c9
Parents: 052a611
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Sep 1 16:22:01 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Sep 1 16:22:01 2015 +0200
----------------------------------------------------------------------
deployment_admin/private/src/deployment_admin.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/5c5a0ebc/deployment_admin/private/src/deployment_admin.c
----------------------------------------------------------------------
diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c
index f1ab5bc..74a5ce4 100644
--- a/deployment_admin/private/src/deployment_admin.c
+++ b/deployment_admin/private/src/deployment_admin.c
@@ -460,6 +460,7 @@ celix_status_t deploymentAdmin_stopDeploymentPackageBundles(deployment_admin_pt
fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "DEPLOYMENT_ADMIN: Bundle %s not found", info->symbolicName);
}
}
+ arrayList_destroy(infos);
}
return status;
@@ -500,7 +501,7 @@ celix_status_t deploymentAdmin_updateDeploymentPackageBundles(deployment_admin_p
bundleContext_installBundle2(admin->context, bsn, bundlePath, &updateBundle);
}
}
-
+ arrayList_destroy(infos);
return status;
}
@@ -524,6 +525,7 @@ celix_status_t deploymentAdmin_startDeploymentPackageCustomizerBundles(deploymen
}
}
}
+ arrayList_destroy(sourceInfos);
if (target != NULL) {
array_list_pt targetInfos = NULL;
@@ -538,6 +540,7 @@ celix_status_t deploymentAdmin_startDeploymentPackageCustomizerBundles(deploymen
}
}
}
+ arrayList_destroy(targetInfos);
}
for (i = 0; i < arrayList_size(bundles); i++) {
@@ -668,6 +671,7 @@ celix_status_t deploymentAdmin_dropDeploymentPackageBundles(deployment_admin_pt
}
}
}
+ arrayList_destroy(targetInfos);
}
return status;
@@ -691,6 +695,7 @@ celix_status_t deploymentAdmin_startDeploymentPackageBundles(deployment_admin_pt
}
}
}
+ arrayList_destroy(infos);
return status;
}
[14/19] celix git commit: CELIX-258: rename framework bundleActivator
to frameworkActivator
Posted by bp...@apache.org.
CELIX-258: rename framework bundleActivator to frameworkActivator
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/7e3b33f6
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/7e3b33f6
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/7e3b33f6
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 7e3b33f625e6f00b285d5ce9db3020ece4bccc1f
Parents: e59dea5
Author: Bjoern Petri <bp...@apache.org>
Authored: Fri Sep 25 19:12:03 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Fri Sep 25 19:12:03 2015 +0200
----------------------------------------------------------------------
framework/private/src/framework.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/7e3b33f6/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index 6aad985..e0391e7 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -104,6 +104,11 @@ static celix_status_t framework_loadBundleLibraries(framework_pt framework, bund
static celix_status_t framework_loadLibraries(framework_pt framework, char *libraries, char *activator, bundle_archive_pt archive, void **activatorHandle);
static celix_status_t framework_loadLibrary(framework_pt framework, char *library, bundle_archive_pt archive, void **handle);
+static celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context);
+static celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context);
+static celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context);
+
+
struct fw_refreshHelper {
framework_pt framework;
bundle_pt bundle;
@@ -2303,12 +2308,12 @@ celix_status_t fw_invokeFrameworkListener(framework_pt framework, framework_list
return ret;
}
-celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context) {
// nothing to do
return CELIX_SUCCESS;
}
-celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context) {
celix_status_t status = CELIX_SUCCESS;
celix_thread_t shutdownThread;
@@ -2333,7 +2338,7 @@ celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt contex
return status;
}
-celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context) {
return CELIX_SUCCESS;
}
[04/19] celix git commit: CELIX-251: added missing includes
Posted by bp...@apache.org.
CELIX-251: added missing includes
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/f32a2335
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/f32a2335
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/f32a2335
Branch: refs/heads/feature/CELIX-247_android_support
Commit: f32a2335989ad6f9710a55c385b85c3b83413afd
Parents: 1208336
Author: Bjoern Petri <bp...@apache.org>
Authored: Mon Aug 17 11:11:41 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Aug 17 11:11:41 2015 +0200
----------------------------------------------------------------------
device_access/example/base_driver/private/src/base_driver.c | 2 +-
.../example/consuming_driver/private/src/consuming_driver.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/f32a2335/device_access/example/base_driver/private/src/base_driver.c
----------------------------------------------------------------------
diff --git a/device_access/example/base_driver/private/src/base_driver.c b/device_access/example/base_driver/private/src/base_driver.c
index fafec6d..33a2dca 100644
--- a/device_access/example/base_driver/private/src/base_driver.c
+++ b/device_access/example/base_driver/private/src/base_driver.c
@@ -24,7 +24,7 @@
* \copyright Apache License, Version 2.0
*/
#include <stdlib.h>
-
+#include <string.h>
#include <celix_errno.h>
#include <bundle_activator.h>
#include <bundle_context.h>
http://git-wip-us.apache.org/repos/asf/celix/blob/f32a2335/device_access/example/consuming_driver/private/src/consuming_driver.c
----------------------------------------------------------------------
diff --git a/device_access/example/consuming_driver/private/src/consuming_driver.c b/device_access/example/consuming_driver/private/src/consuming_driver.c
index 0842d57..b44ac32 100644
--- a/device_access/example/consuming_driver/private/src/consuming_driver.c
+++ b/device_access/example/consuming_driver/private/src/consuming_driver.c
@@ -24,6 +24,7 @@
* \copyright Apache License, Version 2.0
*/
#include <stdlib.h>
+#include <string.h>
#include <device.h>
#include <service_tracker.h>
[10/19] celix git commit: CELIX-255: Changed default values to ON for
a set of BUILD_* options.
Posted by bp...@apache.org.
CELIX-255: Changed default values to ON for a set of BUILD_* options.
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e0a51953
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e0a51953
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e0a51953
Branch: refs/heads/feature/CELIX-247_android_support
Commit: e0a51953fc2de5f589a207fc08bce80a50e8a944
Parents: 5c5a0eb
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Sep 1 16:27:34 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Sep 1 16:27:34 2015 +0200
----------------------------------------------------------------------
dependency_manager_2/CMakeLists.txt | 2 +-
deployment_admin/CMakeLists.txt | 2 +-
log_service/CMakeLists.txt | 2 +-
log_writer/CMakeLists.txt | 2 +-
remote_services/discovery_configured/CMakeLists.txt | 2 +-
remote_services/discovery_etcd/CMakeLists.txt | 2 +-
remote_services/examples/CMakeLists.txt | 2 +-
remote_services/remote_service_admin_http/CMakeLists.txt | 2 +-
remote_shell/CMakeLists.txt | 4 ++--
shell/CMakeLists.txt | 2 +-
shell_tui/CMakeLists.txt | 2 +-
11 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/dependency_manager_2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dependency_manager_2/CMakeLists.txt b/dependency_manager_2/CMakeLists.txt
index 7aecc61..373cd34 100644
--- a/dependency_manager_2/CMakeLists.txt
+++ b/dependency_manager_2/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(DEPENDENCY_MANAGER2 "Option to build the dependency manager static library" "OFF" DEPS framework)
+celix_subproject(DEPENDENCY_MANAGER2 "Option to build the dependency manager static library" ON DEPS framework)
if (DEPENDENCY_MANAGER2)
# Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
if(UNIX AND NOT WIN32)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/deployment_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/deployment_admin/CMakeLists.txt b/deployment_admin/CMakeLists.txt
index cd267bf..cff425d 100644
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" OFF DEPS framework launcher shell_tui log_writer)
+celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" ON DEPS framework launcher shell_tui log_writer)
if (DEPLOYMENT_ADMIN)
find_package(CURL REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/log_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_service/CMakeLists.txt b/log_service/CMakeLists.txt
index 933c2fb..b431db0 100644
--- a/log_service/CMakeLists.txt
+++ b/log_service/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" "OFF" DEPS framework)
+celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" ON DEPS framework)
if (LOG_SERVICE)
SET_HEADER(BUNDLE_VERSION "1.0.0")
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/log_writer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_writer/CMakeLists.txt b/log_writer/CMakeLists.txt
index d98b311..4692d7a 100644
--- a/log_writer/CMakeLists.txt
+++ b/log_writer/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundles" "OFF" DEPS FRAMEWORK LOG_SERVICE)
+celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundles" ON DEPS FRAMEWORK LOG_SERVICE)
if (LOG_WRITER)
add_subdirectory(log_writer_stdout)
add_subdirectory(log_writer_syslog)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/remote_services/discovery_configured/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_configured/CMakeLists.txt b/remote_services/discovery_configured/CMakeLists.txt
index 9b8fa09..9fc6a81 100644
--- a/remote_services/discovery_configured/CMakeLists.txt
+++ b/remote_services/discovery_configured/CMakeLists.txt
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(RSA_DISCOVERY_CONFIGURED "Option to enable building the Discovery (Configured) bundle" OFF)
+celix_subproject(RSA_DISCOVERY_CONFIGURED "Option to enable building the Discovery (Configured) bundle" ON)
if (RSA_DISCOVERY_CONFIGURED)
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/remote_services/discovery_etcd/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/CMakeLists.txt b/remote_services/discovery_etcd/CMakeLists.txt
index abc5905..aa1e08c 100644
--- a/remote_services/discovery_etcd/CMakeLists.txt
+++ b/remote_services/discovery_etcd/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(RSA_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" OFF)
+celix_subproject(RSA_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" ON)
if (RSA_DISCOVERY_ETCD)
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/remote_services/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index d975cc2..9246a0f 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(RSA_EXAMPLES "Option to enable building the RSA examples" OFF DEPS LAUNCHER shell_tui log_writer RSA_TOPOLOGY_MANAGER)
+celix_subproject(RSA_EXAMPLES "Option to enable building the RSA examples" ON DEPS LAUNCHER shell_tui log_writer RSA_TOPOLOGY_MANAGER)
if (RSA_EXAMPLES)
add_subdirectory(calculator_service)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/remote_services/remote_service_admin_http/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/CMakeLists.txt b/remote_services/remote_service_admin_http/CMakeLists.txt
index f066407..a147a37 100644
--- a/remote_services/remote_service_admin_http/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/CMakeLists.txt
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(RSA_REMOTE_SERVICE_ADMIN_HTTP "Option to enable building the Remote Service Admin Service HTTP bundle" OFF)
+celix_subproject(RSA_REMOTE_SERVICE_ADMIN_HTTP "Option to enable building the Remote Service Admin Service HTTP bundle" ON)
if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
find_package(CURL REQUIRED)
find_package(UUID REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/remote_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_shell/CMakeLists.txt b/remote_shell/CMakeLists.txt
index 892fc48..e945415 100644
--- a/remote_shell/CMakeLists.txt
+++ b/remote_shell/CMakeLists.txt
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(REMOTE_SHELL "Option to enable building the Remote Shell bundles" OFF DEPS LAUNCHER SHELL_TUI)
+celix_subproject(REMOTE_SHELL "Option to enable building the Remote Shell bundles" ON DEPS LAUNCHER SHELL_TUI)
if (REMOTE_SHELL)
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_shell")
@@ -41,4 +41,4 @@ if (REMOTE_SHELL)
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
target_link_libraries(remote_shell celix_framework)
-endif (REMOTE_SHELL)
\ No newline at end of file
+endif (REMOTE_SHELL)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt
index 07f4c6e..8f7c94a 100644
--- a/shell/CMakeLists.txt
+++ b/shell/CMakeLists.txt
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(SHELL "Option to enable building the Shell bundles" "OFF" DEPS LAUNCHER LOG_SERVICE)
+celix_subproject(SHELL "Option to enable building the Shell bundles" ON DEPS LAUNCHER LOG_SERVICE)
if (SHELL)
find_package(CURL REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/e0a51953/shell_tui/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell_tui/CMakeLists.txt b/shell_tui/CMakeLists.txt
index 65a8e9c..ab56f73 100644
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" OFF DEPS LAUNCHER SHELL)
+celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" ON DEPS LAUNCHER SHELL)
if (SHELL_TUI)
SET_HEADER(BUNDLE_VERSION "1.0.0")
[06/19] celix git commit: CELIX-252: Aligned memory allocation
Posted by bp...@apache.org.
CELIX-252: Aligned memory allocation
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/1010f712
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/1010f712
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/1010f712
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 1010f71262e1438d08c30b179bb35c0393df9e71
Parents: c396aee
Author: Bjoern Petri <bp...@apache.org>
Authored: Tue Aug 25 23:05:28 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Tue Aug 25 23:05:28 2015 +0200
----------------------------------------------------------------------
.../private/src/endpoint_discovery_poller.c | 72 +++++++++++---------
.../discovery_etcd/private/src/etcd_watcher.c | 9 ++-
.../discovery_shm/private/src/shm_watcher.c | 2 +-
3 files changed, 46 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/1010f712/remote_services/discovery/private/src/endpoint_discovery_poller.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery/private/src/endpoint_discovery_poller.c b/remote_services/discovery/private/src/endpoint_discovery_poller.c
index 569d7a9..ae269cf 100644
--- a/remote_services/discovery/private/src/endpoint_discovery_poller.c
+++ b/remote_services/discovery/private/src/endpoint_discovery_poller.c
@@ -172,60 +172,66 @@ celix_status_t endpointDiscoveryPoller_getDiscoveryEndpoints(endpoint_discovery_
* Adds a new endpoint URL to the list of polled endpoints.
*/
celix_status_t endpointDiscoveryPoller_addDiscoveryEndpoint(endpoint_discovery_poller_pt poller, char *url) {
- celix_status_t status;
+ celix_status_t status;
- status = celixThreadMutex_lock(&(poller)->pollerLock);
- if (status != CELIX_SUCCESS) {
- return CELIX_BUNDLE_EXCEPTION;
- }
+ status = celixThreadMutex_lock(&(poller)->pollerLock);
+ if (status != CELIX_SUCCESS) {
+ return CELIX_BUNDLE_EXCEPTION;
+ }
// Avoid memory leaks when adding an already existing URL...
array_list_pt endpoints = hashMap_get(poller->entries, url);
- if (endpoints == NULL) {
+ if (endpoints == NULL) {
status = arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &endpoints);
if (status == CELIX_SUCCESS) {
- hashMap_put(poller->entries, url, endpoints);
+ logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: add new discovery endpoint with url %s", url);
+ hashMap_put(poller->entries, strdup(url), endpoints);
}
- }
+ }
status = celixThreadMutex_unlock(&poller->pollerLock);
- return status;
+ return status;
}
/**
* Removes an endpoint URL from the list of polled endpoints.
*/
celix_status_t endpointDiscoveryPoller_removeDiscoveryEndpoint(endpoint_discovery_poller_pt poller, char *url) {
- celix_status_t status;
+ celix_status_t status = CELIX_SUCCESS;
- status = celixThreadMutex_lock(&poller->pollerLock);
- if (status != CELIX_SUCCESS) {
- return CELIX_BUNDLE_EXCEPTION;
- }
+ if (celixThreadMutex_lock(&poller->pollerLock) != CELIX_SUCCESS) {
+ status = CELIX_BUNDLE_EXCEPTION;
+ } else {
+ hash_map_entry_pt entry = hashMap_getEntry(poller->entries, url);
- hash_map_entry_pt entry = hashMap_getEntry(poller->entries, url);
- char* origKey = hashMapEntry_getKey(entry);
+ if (entry == NULL) {
+ logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: There was no entry found belonging to url %s - maybe already removed?", url);
+ } else {
+ char* origKey = hashMapEntry_getKey(entry);
- array_list_pt entries = hashMap_remove(poller->entries, url);
+ logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: remove discovery endpoint with url %s", url);
- for (unsigned int i = arrayList_size(entries); i > 0 ; i--) {
- endpoint_description_pt endpoint = arrayList_get(entries, i-1);
- discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
- arrayList_remove(entries, i-1);
- endpointDescription_destroy(endpoint);
- }
+ array_list_pt entries = hashMap_remove(poller->entries, url);
- if (entries != NULL) {
- arrayList_destroy(entries);
- }
+ for (unsigned int i = arrayList_size(entries); i > 0; i--) {
+ endpoint_description_pt endpoint = arrayList_get(entries, i - 1);
+ discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+ arrayList_remove(entries, i - 1);
+ endpointDescription_destroy(endpoint);
+ }
+ if (entries != NULL) {
+ arrayList_destroy(entries);
+ }
- free(origKey);
- status = celixThreadMutex_unlock(&poller->pollerLock);
+ free(origKey);
+ }
+ status = celixThreadMutex_unlock(&poller->pollerLock);
+ }
- return status;
+ return status;
}
static void *endpointDiscoveryPoller_poll(void *data) {
@@ -243,6 +249,7 @@ static void *endpointDiscoveryPoller_poll(void *data) {
}
hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+
while (hashMapIterator_hasNext(iterator)) {
hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
@@ -251,9 +258,9 @@ static void *endpointDiscoveryPoller_poll(void *data) {
array_list_pt updatedEndpoints = NULL;
// create an arraylist with a custom equality test to ensure we can find endpoints properly...
- status = arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
-
+ arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
+
if (status != CELIX_SUCCESS) {
status = celixThreadMutex_unlock(&poller->pollerLock);
continue;
@@ -262,6 +269,7 @@ static void *endpointDiscoveryPoller_poll(void *data) {
if (updatedEndpoints) {
for (unsigned int i = arrayList_size(currentEndpoints); i > 0 ; i--) {
endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i-1);
+
if (!arrayList_contains(updatedEndpoints, endpoint)) {
status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
arrayList_remove(currentEndpoints, i-1);
@@ -339,6 +347,8 @@ static celix_status_t endpointDiscoveryPoller_getEndpoints(endpoint_discovery_po
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, endpointDiscoveryPoller_writeMemory);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
http://git-wip-us.apache.org/repos/asf/celix/blob/1010f712/remote_services/discovery_etcd/private/src/etcd_watcher.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/private/src/etcd_watcher.c b/remote_services/discovery_etcd/private/src/etcd_watcher.c
index 89be84e..c54fcdc 100644
--- a/remote_services/discovery_etcd/private/src/etcd_watcher.c
+++ b/remote_services/discovery_etcd/private/src/etcd_watcher.c
@@ -131,7 +131,7 @@ static celix_status_t etcdWatcher_addAlreadyExistingWatchpoints(discovery_pt dis
if (etcd_get(key, &value[0], &action[0], &modIndex) == true) {
// TODO: check that this is not equals to the local endpoint
- endpointDiscoveryPoller_addDiscoveryEndpoint(discovery->poller, strdup(&value[0]));
+ endpointDiscoveryPoller_addDiscoveryEndpoint(discovery->poller, &value[0]);
if (modIndex > *highestModified) {
*highestModified = modIndex;
@@ -206,23 +206,22 @@ static celix_status_t etcdWatcher_addOwnFramework(etcd_watcher_pt watcher)
static celix_status_t etcdWatcher_addEntry(etcd_watcher_pt watcher, char* key, char* value) {
- celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+ celix_status_t status = CELIX_BUNDLE_EXCEPTION;
endpoint_discovery_poller_pt poller = watcher->discovery->poller;
if (!hashMap_containsKey(watcher->entries, key)) {
status = endpointDiscoveryPoller_addDiscoveryEndpoint(poller, value);
if (status == CELIX_SUCCESS) {
- hashMap_put(watcher->entries, key, value);
+ hashMap_put(watcher->entries, strdup(key), strdup(value));
}
}
return status;
}
-
static celix_status_t etcdWatcher_removeEntry(etcd_watcher_pt watcher, char* key, char* value) {
- celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+ celix_status_t status = CELIX_BUNDLE_EXCEPTION;
endpoint_discovery_poller_pt poller = watcher->discovery->poller;
if (hashMap_containsKey(watcher->entries, key)) {
http://git-wip-us.apache.org/repos/asf/celix/blob/1010f712/remote_services/discovery_shm/private/src/shm_watcher.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery_shm/private/src/shm_watcher.c b/remote_services/discovery_shm/private/src/shm_watcher.c
index 212af55..2152345 100644
--- a/remote_services/discovery_shm/private/src/shm_watcher.c
+++ b/remote_services/discovery_shm/private/src/shm_watcher.c
@@ -111,7 +111,7 @@ static celix_status_t shmWatcher_syncEndpoints(shm_watcher_pt watcher) {
}
if (elementFound == false) {
- endpointDiscoveryPoller_addDiscoveryEndpoint(watcher->poller, strdup(url));
+ endpointDiscoveryPoller_addDiscoveryEndpoint(watcher->poller, url);
}
}
}
[19/19] celix git commit: Merge branch
'feature/CELIX-247_android_support' of
https://git-wip-us.apache.org/repos/asf/celix into
feature/CELIX-247_android_support
Posted by bp...@apache.org.
Merge branch 'feature/CELIX-247_android_support' of https://git-wip-us.apache.org/repos/asf/celix into feature/CELIX-247_android_support
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/70ccd0bb
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/70ccd0bb
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/70ccd0bb
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 70ccd0bb232b8bbc597fa511f33f239bba51c735
Parents: 51f8200 9163e76
Author: Bjoern Petri <bp...@apache.org>
Authored: Mon Sep 28 12:02:02 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Sep 28 12:02:02 2015 +0200
----------------------------------------------------------------------
----------------------------------------------------------------------
[13/19] celix git commit: CELIX-238: replace dlopen/dlsym with direct
function pointer assignment
Posted by bp...@apache.org.
CELIX-238: replace dlopen/dlsym with direct function pointer assignment
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e59dea5f
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e59dea5f
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e59dea5f
Branch: refs/heads/feature/CELIX-247_android_support
Commit: e59dea5ff0ee58205e3ab098adcdbf9d1e3dbc20
Parents: fad8ca2
Author: Bjoern Petri <bp...@apache.org>
Authored: Fri Sep 25 18:59:14 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Fri Sep 25 18:59:14 2015 +0200
----------------------------------------------------------------------
framework/private/src/framework.c | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/e59dea5f/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index f493318..6aad985 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -162,7 +162,6 @@ framework_logger_pt logger;
#ifdef _WIN32
#define handle_t HMODULE
- #define fw_getSystemLibrary() fw_getCurrentModule()
#define fw_openLibrary(path) LoadLibrary(path)
#define fw_closeLibrary(handle) FreeLibrary(handle)
@@ -177,7 +176,6 @@ framework_logger_pt logger;
}
#else
#define handle_t void *
- #define fw_getSystemLibrary() dlopen(NULL, RTLD_LAZY|RTLD_LOCAL)
#define fw_openLibrary(path) dlopen(path, RTLD_LAZY|RTLD_LOCAL)
#define fw_closeLibrary(handle) dlclose(handle)
#define fw_getSymbol(handle, name) dlsym(handle, name)
@@ -426,16 +424,6 @@ celix_status_t fw_init(framework_pt framework) {
status = CELIX_DO_IF(status, serviceRegistry_create(framework, fw_serviceChanged, &framework->registry));
status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_STARTING));
status = CELIX_DO_IF(status, celixThreadCondition_init(&framework->shutdownGate, NULL));
- if (status == CELIX_SUCCESS) {
- handle_t handle = NULL;
- handle = fw_getSystemLibrary();
- if (handle != NULL) {
- bundle_setHandle(framework->bundle, handle);
- } else {
- status = CELIX_FRAMEWORK_EXCEPTION;
- fw_logCode(framework->logger, OSGI_FRAMEWORK_LOG_ERROR, status, "Could not get handle to framework library");
- }
- }
bundle_context_pt context = NULL;
#ifdef WITH_APR
@@ -453,10 +441,10 @@ celix_status_t fw_init(framework_pt framework) {
bundle_context_pt context = NULL;
void * userData = NULL;
- create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_CREATE);
- start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_START);
- stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_STOP);
- destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY);
+ create_function_pt create = NULL;
+ start_function_pt start = (start_function_pt) frameworkActivator_start;
+ stop_function_pt stop = (stop_function_pt) frameworkActivator_stop;
+ destroy_function_pt destroy = (destroy_function_pt) frameworkActivator_destroy;
activator->start = start;
activator->stop = stop;
@@ -2315,12 +2303,12 @@ celix_status_t fw_invokeFrameworkListener(framework_pt framework, framework_list
return ret;
}
-celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context) {
// nothing to do
return CELIX_SUCCESS;
}
-celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context) {
celix_status_t status = CELIX_SUCCESS;
celix_thread_t shutdownThread;
@@ -2345,7 +2333,7 @@ celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context)
return status;
}
-celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context) {
return CELIX_SUCCESS;
}
[07/19] celix git commit: CELIX-159: Added -pthread flag. Among other
things, this will define _REENTRANT.
Posted by bp...@apache.org.
CELIX-159: Added -pthread flag. Among other things, this will define _REENTRANT.
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/5e6d2f2c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/5e6d2f2c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/5e6d2f2c
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 5e6d2f2c374b3c8d738e167c492a541042ea257f
Parents: 1010f71
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Sep 1 16:00:13 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Sep 1 16:04:43 2015 +0200
----------------------------------------------------------------------
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/5e6d2f2c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bee365..a885df5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,8 @@ set(CMAKE_INSTALL_NAME_DIR "@rpath")
SET(CMAKE_BUILD_TYPE "Debug")
IF(UNIX)
- SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -pthread ${CMAKE_C_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "-pthread ${CMAKE_EXE_LINKER_FLAGS}")
ENDIF()
IF(WIN32)
SET(CMAKE_C_FLAGS "-D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
[02/19] celix git commit: CELIX-119: Remove apr from device_access
Posted by bp...@apache.org.
CELIX-119: Remove apr from device_access
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b0688a4d
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b0688a4d
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b0688a4d
Branch: refs/heads/feature/CELIX-247_android_support
Commit: b0688a4d9154ade806a2f4d284127469f92ed787
Parents: 57a1578
Author: Bjoern Petri <bp...@apache.org>
Authored: Tue Aug 11 16:16:32 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Tue Aug 11 16:16:32 2015 +0200
----------------------------------------------------------------------
.travis.yml | 2 +-
device_access/device_access/CMakeLists.txt | 2 --
device_access/driver_locator/CMakeLists.txt | 2 --
device_access/example/base_driver/CMakeLists.txt | 2 --
device_access/example/consuming_driver/CMakeLists.txt | 2 --
device_access/example/refining_driver/CMakeLists.txt | 2 --
6 files changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index d66498f..bb53363 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,7 +12,7 @@ matrix:
before_script:
- mkdir build install
- cd build
- - cmake -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_DISCOVERY_SHM=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DCMAKE_INSTALL_PREFIX=../install ..
+ - cmake -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_DISCOVERY_SHM=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DBUILD_DEVICE_ACCESS=ON -DBUILD_DEVICE_ACCESS_EXAMPLE=ON -DCMAKE_INSTALL_PREFIX=../install ..
script:
- make all && make deploy && make install
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/device_access/device_access/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/device_access/CMakeLists.txt b/device_access/device_access/CMakeLists.txt
index 7d7b79b..03e7817 100644
--- a/device_access/device_access/CMakeLists.txt
+++ b/device_access/device_access/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(APR REQUIRED)
-
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_device_manager")
SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Device Manager")
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/device_access/driver_locator/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/driver_locator/CMakeLists.txt b/device_access/driver_locator/CMakeLists.txt
index 61d25f9..f47696a 100644
--- a/device_access/driver_locator/CMakeLists.txt
+++ b/device_access/driver_locator/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(APR REQUIRED)
-
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_driver_locator")
SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Driver Locator")
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/device_access/example/base_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/base_driver/CMakeLists.txt b/device_access/example/base_driver/CMakeLists.txt
index ffed3d3..82b916e 100644
--- a/device_access/example/base_driver/CMakeLists.txt
+++ b/device_access/example/base_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(APR REQUIRED)
-
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_base_driver_example")
SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Base Driver Example")
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/device_access/example/consuming_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/consuming_driver/CMakeLists.txt b/device_access/example/consuming_driver/CMakeLists.txt
index bb6795b..96dc8e8 100644
--- a/device_access/example/consuming_driver/CMakeLists.txt
+++ b/device_access/example/consuming_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(APR REQUIRED)
-
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_word_consuming_driver_example")
SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Word Consuming Driver Example")
http://git-wip-us.apache.org/repos/asf/celix/blob/b0688a4d/device_access/example/refining_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/refining_driver/CMakeLists.txt b/device_access/example/refining_driver/CMakeLists.txt
index 33dff1e..df5470b 100644
--- a/device_access/example/refining_driver/CMakeLists.txt
+++ b/device_access/example/refining_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(APR REQUIRED)
-
SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_char_refining_driver_example")
SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Char Refining Driver Example")
[08/19] celix git commit: CELIX-253: Applied bug fix patch for
deployment_admin. Added .idea to .gitignore
Posted by bp...@apache.org.
CELIX-253: Applied bug fix patch for deployment_admin. Added .idea to .gitignore
The path fixes an issue in deployment admin where strcmp result was compared gt instead of !=.
This resulted in some changes (version 9.0.0 -> version 10.0.0) not being triggered.
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/052a6116
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/052a6116
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/052a6116
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 052a611656df5870af6672605e9a87b27b7f4884
Parents: 5e6d2f2
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Sep 1 16:14:53 2015 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Sep 1 16:14:53 2015 +0200
----------------------------------------------------------------------
.gitignore | 1 +
deployment_admin/private/src/deployment_admin.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/052a6116/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index eb89068..98033a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,5 @@
/.project
.DS_Store
+.idea
build
http://git-wip-us.apache.org/repos/asf/celix/blob/052a6116/deployment_admin/private/src/deployment_admin.c
----------------------------------------------------------------------
diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c
index 9f29866..f1ab5bc 100644
--- a/deployment_admin/private/src/deployment_admin.c
+++ b/deployment_admin/private/src/deployment_admin.c
@@ -218,7 +218,7 @@ static void *deploymentAdmin_poll(void *deploymentAdmin) {
char *last = arrayList_get(versions, arrayList_size(versions) - 1);
if (last != NULL) {
- if (admin->current == NULL || strcmp(last, admin->current) > 0) {
+ if (admin->current == NULL || strcmp(last, admin->current) != 0) {
int length = strlen(admin->pollUrl) + strlen(last) + 2;
char request[length];
if (admin->current == NULL) {
[03/19] celix git commit: CELIX-250: Add cmake install statement for
config.h
Posted by bp...@apache.org.
CELIX-250: Add cmake install statement for config.h
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/12083361
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/12083361
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/12083361
Branch: refs/heads/feature/CELIX-247_android_support
Commit: 12083361f671c4fd62ec90a10859f0c5f7498de2
Parents: b0688a4
Author: Bjoern Petri <bp...@apache.org>
Authored: Mon Aug 17 11:09:55 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Mon Aug 17 11:09:55 2015 +0200
----------------------------------------------------------------------
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/12083361/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 137c81b..4bee365 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,6 +59,7 @@ if(${WITH_APR})
endif()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/celix)
## New sub project must use a buildoption to be able to enable/disable the project using the CMake Editor
## Sub projects depending on another sub project automatically enable these dependencies