celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-237: fixed an issue in dfi export services and fixed an import.
Date Tue, 11 Aug 2015 18:48:16 GMT
Repository: celix
Updated Branches:
  refs/heads/feature/CELIX-237_rsa-ffi 7dc2039f1 -> 4c4a5e9bd


CELIX-237: fixed an issue in dfi export services and fixed an import.

- Added dummy access to ptr in export_registration to force full mem initialization for modern
unix (linux osx) systems
- remove incorrect ffi-x86.. import


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

Branch: refs/heads/feature/CELIX-237_rsa-ffi
Commit: 4c4a5e9bd064e60b0d6d1569a4208d4c3276c669
Parents: 7dc2039
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Aug 11 20:52:58 2015 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Aug 11 20:52:58 2015 +0200

----------------------------------------------------------------------
 .../dynamic_function_interface/dyn_function.c                | 8 --------
 .../private/src/export_registration_dfi.c                    | 6 ++++++
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/4c4a5e9b/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_function.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_function.c
b/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_function.c
index af3902c..0e12791 100644
--- a/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_function.c
+++ b/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_function.c
@@ -3,18 +3,10 @@
  */
 #include "dyn_function.h"
 
-#include <stdio.h>
-#include <stdarg.h>
 #include <strings.h>
-#include <string.h>
 #include <stdlib.h>
 
-#include <ffi.h>
-#include <ffi-x86_64.h>
-
 #include "dyn_common.h"
-#include "dyn_type.h"
-#include "dfi_log_util.h"
 
 struct _dyn_function_type {
     char *name;

http://git-wip-us.apache.org/repos/asf/celix/blob/4c4a5e9b/remote_services/remote_service_admin_dfi/private/src/export_registration_dfi.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/private/src/export_registration_dfi.c
b/remote_services/remote_service_admin_dfi/private/src/export_registration_dfi.c
index 0713efb..74512d3 100644
--- a/remote_services/remote_service_admin_dfi/private/src/export_registration_dfi.c
+++ b/remote_services/remote_service_admin_dfi/private/src/export_registration_dfi.c
@@ -162,6 +162,12 @@ celix_status_t exportRegistration_call(export_registration_pt export,
char *data
 
         void *out = NULL;
         dynType_alloc(lastType, &out); //TODO, NOTE only for simple types or single pointer
types.. TODO check
+
+        //NOTE !! Need to access out, else it is a dummy pointer which will result in errors.
+        char b;
+        memcpy(&b, out, 1);
+
+        dynType_alloc(lastType, &out); //TODO, NOTE only for simple types or single pointer
types.. TODO check
         printf("out ptr is %p value is %f\n", out, *(double *)out);
         args[nrOfArgs-1] = &out; //NOTE for simple type no double
 


Mime
View raw message