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 2015/10/07 14:45:48 UTC

[08/20] celix git commit: CELIX-264: Added missing strdup

CELIX-264: Added missing strdup


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

Branch: refs/heads/feature/CELIX-237_rsa-ffi
Commit: d632500e7f764da5cd887d2ae788044d2c105a4f
Parents: 5498452
Author: Bjoern Petri <bp...@apache.org>
Authored: Sat Oct 3 12:48:14 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Sat Oct 3 12:48:14 2015 +0200

----------------------------------------------------------------------
 remote_services/discovery/private/src/endpoint_discovery_server.c | 3 +--
 .../private/src/remote_service_admin_impl.c                       | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d632500e/remote_services/discovery/private/src/endpoint_discovery_server.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery/private/src/endpoint_discovery_server.c b/remote_services/discovery/private/src/endpoint_discovery_server.c
index 930be59..9c41a4d 100644
--- a/remote_services/discovery/private/src/endpoint_discovery_server.c
+++ b/remote_services/discovery/private/src/endpoint_discovery_server.c
@@ -86,7 +86,6 @@ celix_status_t endpointDiscoveryServer_create(discovery_pt discovery, bundle_con
 	}
 
 	(*server)->loghelper = &discovery->loghelper;
-
 	(*server)->entries = hashMap_create(&utils_stringHash, NULL, &utils_stringEquals, NULL);
 	if (!(*server)->entries) {
 		return CELIX_ENOMEM;
@@ -121,7 +120,7 @@ celix_status_t endpointDiscoveryServer_create(discovery_pt discovery, bundle_con
 	}
 	else {
 		logHelper_log(*(*server)->loghelper, OSGI_LOGSERVICE_WARNING, "No IP address for service annunciation set. Using %s", DEFAULT_SERVER_IP);
-		(*server)->ip = (char*) DEFAULT_SERVER_IP;
+		(*server)->ip = strdup((char*) DEFAULT_SERVER_IP);
 	}
 
 	if (detectedIp != NULL) {

http://git-wip-us.apache.org/repos/asf/celix/blob/d632500e/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c b/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
index 01b2abb..023d8fb 100644
--- a/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
+++ b/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
@@ -150,7 +150,7 @@ celix_status_t remoteServiceAdmin_create(bundle_context_pt context, remote_servi
 		}
 		else {
 			logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_WARNING, "RSA: No IP address for service annunciation set. Using %s", DEFAULT_IP);
-			(*admin)->ip = (char*) DEFAULT_IP;
+			(*admin)->ip = strdup((char*) DEFAULT_IP);
 		}
 
 		if (detectedIp != NULL) {