PengZheng commented on code in PR #448:
URL: https://github.com/apache/celix/pull/448#discussion_r1034279410


##########
bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c:
##########
@@ -763,11 +763,9 @@ static celix_status_t 
remoteServiceAdmin_createEndpointDescription(remote_servic
         status = CELIX_ENOMEM;
     } else {
         (*endpoint)->id = (char*) celix_properties_get(endpointProperties, 
(char*) OSGI_RSA_ENDPOINT_ID, NULL);
-        const char *serviceId = NULL;
-        serviceReference_getProperty(reference, (char*) 
OSGI_FRAMEWORK_SERVICE_ID, &serviceId);
-        (*endpoint)->serviceId = strtoull(serviceId, NULL, 0);
+        (*endpoint)->serviceId = serviceReference_getServiceId(reference);
         (*endpoint)->frameworkUUID = (char*) 
celix_properties_get(endpointProperties, (char*) 
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, NULL);
-        (*endpoint)->service = strndup(interface, 1024*10);
+        (*endpoint)->serviceName = celix_utils_strdup(interface);

Review Comment:
   `celix_utils_strdup` has a very large internal upper limit for string 
length. It may not be a problem here, since it comes from `celix_properties` in 
the framework.
   
   But when importing external properties into the Celix framework, we must set 
a more reasonable upper limit . This is especially true if we are implementing 
something like DNS-SD in Celix. @xuzhenbao 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to