incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject svn commit: r1339133 - /incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
Date Wed, 16 May 2012 12:21:04 GMT
Author: pnoltes
Date: Wed May 16 12:21:04 2012
New Revision: 1339133

URL: http://svn.apache.org/viewvc?rev=1339133&view=rev
Log:
Created workaround in remote_service_admin_impl for a apr allocation bug. Sometimes a child
pools needs to be created to prevent _strange_ memory errors.

Modified:
    incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c

Modified: incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c?rev=1339133&r1=1339132&r2=1339133&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
(original)
+++ incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
Wed May 16 12:21:04 2012
@@ -233,7 +233,10 @@ celix_status_t remoteServiceAdmin_create
 		PROPERTIES endpointProperties, char *interface, endpoint_description_t *description) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	*description = apr_palloc(admin->pool, sizeof(*description));
+	apr_pool_t *childPool = NULL;
+	apr_pool_create(&childPool, admin->pool);
+
+	*description = apr_palloc(childPool, sizeof(*description));
 //	*description = malloc(sizeof(*description));
 	if (!*description) {
 		status = CELIX_ENOMEM;



Mime
View raw message