celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [41/50] celix git commit: CELIX-352: refactor of find ext path for framework bundle
Date Mon, 11 Apr 2016 10:55:08 GMT
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/release/celix-2.0.0
Commit: 2e763f3c74139c355b63111bc9b4ff350af714ca
Parents: 90adc1f
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Fri Feb 12 18:07:04 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@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");


Mime
View raw message