celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [18/20] celix git commit: CELIX-267: add additional check whether endpoint is available
Date Wed, 07 Oct 2015 12:45:58 GMT
CELIX-267: add additional check whether endpoint is available


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

Branch: refs/heads/feature/CELIX-237_rsa-ffi
Commit: 39751029394b81caafe0395a4b5aea75dd07da7b
Parents: 7215825
Author: Bjoern Petri <bpetri@apache.org>
Authored: Wed Oct 7 09:51:02 2015 +0200
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Wed Oct 7 09:51:02 2015 +0200

----------------------------------------------------------------------
 .../private/src/remote_service_admin_impl.c                       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/39751029/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 023d8fb..d6aee31 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
@@ -322,7 +322,7 @@ static int remoteServiceAdmin_callback(struct mg_connection *conn) {
 				for (expIt = 0; expIt < arrayList_size(exports); expIt++) {
 					export_registration_pt export = arrayList_get(exports, expIt);
 					long serviceId = atol(service);
-					if (serviceId == export->endpointDescription->serviceId) {
+					if (serviceId == export->endpointDescription->serviceId && export->endpoint
!= NULL) {
 						uint64_t datalength = request_info->content_length;
 						char* data = malloc(datalength + 1);
 						mg_read(conn, data, datalength);
@@ -447,6 +447,7 @@ celix_status_t remoteServiceAdmin_exportService(remote_service_admin_pt
admin, c
 				exportRegistration_open(registration);
 				exportRegistration_startTracking(registration);
 			}
+
 			celixThreadMutex_lock(&admin->exportedServicesLock);
 			hashMap_put(admin->exportedServices, reference, *registrations);
 			celixThreadMutex_unlock(&admin->exportedServicesLock);


Mime
View raw message