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 2016/02/12 18:07:08 UTC
celix git commit: CELIX-352: refactor of find ext path for framework
bundle
Repository: celix
Updated Branches:
refs/heads/develop 90adc1f4e -> 2e763f3c7
CELIX-352: refactor of find ext path for framework bundle
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/2e763f3c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/2e763f3c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/2e763f3c
Branch: refs/heads/develop
Commit: 2e763f3c74139c355b63111bc9b4ff350af714ca
Parents: 90adc1f
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 12 18:07:04 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 12 18:07:04 2016 +0100
----------------------------------------------------------------------
.../rsa/private/src/dfi_utils.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/2e763f3c/remote_services/remote_service_admin_dfi/rsa/private/src/dfi_utils.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/private/src/dfi_utils.c b/remote_services/remote_service_admin_dfi/rsa/private/src/dfi_utils.c
index e9888f9..503c931 100644
--- a/remote_services/remote_service_admin_dfi/rsa/private/src/dfi_utils.c
+++ b/remote_services/remote_service_admin_dfi/rsa/private/src/dfi_utils.c
@@ -24,20 +24,15 @@
static celix_status_t dfi_findFileForFramework(bundle_context_pt context, const char *fileName, FILE **out) {
celix_status_t status;
- char cwd[1024];
- char *extPath = NULL;
+ char pwd[1024]
char path[1024];
status = bundleContext_getProperty(context, "CELIX_FRAMEWORK_EXTENDER_PATH", &extPath);
- if (status != CELIX_SUCCESS || extPath == NULL) {
- getcwd(cwd, sizeof(cwd));
- extPath = cwd;
- if (extPath == NULL) {
- status = CELIX_FILE_IO_EXCEPTION;
- }
+ if (status != CELIX_SUCCESS) {
+ getcwd(pwd, sizeof(pwd));
}
- snprintf(path, sizeof(path), "%s/%s", extPath, fileName);
+ snprintf(path, sizeof(path), "%s/%s", pwd, fileName);
if (status == CELIX_SUCCESS) {
FILE *df = fopen(path, "r");