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-269: Fixes issue in dependency manager when providing NULL as properties for a provided services
Date Mon, 08 Feb 2016 19:15:21 GMT
Repository: celix
Updated Branches:
  refs/heads/develop ea9a5a8de -> 6bf16bd8c


CELIX-269: Fixes issue in dependency manager when providing NULL as properties for a provided
services


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

Branch: refs/heads/develop
Commit: 6bf16bd8c983cf3fe83c1ccd19334edf0944b8a9
Parents: ea9a5a8
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Mon Feb 8 20:14:41 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Mon Feb 8 20:14:41 2016 +0100

----------------------------------------------------------------------
 dependency_manager/private/src/dm_component_impl.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/6bf16bd8/dependency_manager/private/src/dm_component_impl.c
----------------------------------------------------------------------
diff --git a/dependency_manager/private/src/dm_component_impl.c b/dependency_manager/private/src/dm_component_impl.c
index 9b5cdbe..0d9745e 100644
--- a/dependency_manager/private/src/dm_component_impl.c
+++ b/dependency_manager/private/src/dm_component_impl.c
@@ -335,6 +335,10 @@ celix_status_t component_addInterface(dm_component_pt component, char
*serviceNa
         dm_interface_t *interface = (dm_interface_t *) calloc(1, sizeof(*interface));
         char *name = strdup(serviceName);
 
+        if (properties == NULL) {
+            properties = properties_create();
+        }
+
         if ((properties_get(properties, (char*) CELIX_FRAMEWORK_SERVICE_VERSION) == NULL)
&& (serviceVersion != NULL)) {
             properties_set(properties, (char*) CELIX_FRAMEWORK_SERVICE_VERSION, serviceVersion);
         }


Mime
View raw message