celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [42/50] celix git commit: CELIX-352: Fix issue in dfi_utils
Date Mon, 11 Apr 2016 10:55:09 GMT
CELIX-352: Fix issue in dfi_utils


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b26889c1
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b26889c1
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b26889c1

Branch: refs/heads/release/celix-2.0.0
Commit: b26889c13d0a9ccf447fff1f55456fbbc655322b
Parents: 2e763f3
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Sat Feb 13 10:23:49 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Sat Feb 13 10:23:49 2016 +0100

----------------------------------------------------------------------
 .../remote_service_admin_dfi/rsa/private/src/dfi_utils.c     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/b26889c1/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 503c931..ba66e52 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,15 +24,17 @@
 static celix_status_t dfi_findFileForFramework(bundle_context_pt context, const char *fileName,
FILE **out) {
     celix_status_t  status;
 
-    char pwd[1024]
+    char pwd[1024];
     char path[1024];
+    char *extPath = NULL;
    
     status = bundleContext_getProperty(context, "CELIX_FRAMEWORK_EXTENDER_PATH", &extPath);
-    if (status != CELIX_SUCCESS) {
+    if (status != CELIX_SUCCESS || extPath == NULL) {
         getcwd(pwd, sizeof(pwd));
+        extPath = pwd;
     }
 
-    snprintf(path, sizeof(path), "%s/%s", pwd, fileName);
+    snprintf(path, sizeof(path), "%s/%s", extPath, fileName);
 
     if (status == CELIX_SUCCESS) {
         FILE *df = fopen(path, "r");


Mime
View raw message