Author: pnoltes
Date: Wed Jun  4 10:29:11 2014
New Revision: 1600090

URL: http://svn.apache.org/r1600090
Log:
CELIX-119: updates for the changed linked_list

Modified:
    incubator/celix/trunk/framework/private/src/bundle_archive.c
    incubator/celix/trunk/framework/private/src/manifest_parser.c
    incubator/celix/trunk/framework/private/src/module.c

Modified: incubator/celix/trunk/framework/private/src/bundle_archive.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_archive.c?rev=1600090&r1=1600089&r2=1600090&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_archive.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_archive.c Wed Jun  4 
10:29:11 2014
@@ -150,7 +150,7 @@ static apr_status_t bundleArchive_destro
        archive = NULL;
 
        if (archive->revisions != NULL) {
-               free(archive->revisions);
+               linkedListIterator_destroy(archive->revisions)
        }
 
        framework_logIfError(archive->logger, status, NULL, "Could not create 
archive");

Modified: incubator/celix/trunk/framework/private/src/manifest_parser.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/manifest_parser.c?rev=1600090&r1=1600089&r2=1600090&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/manifest_parser.c (original)
+++ incubator/celix/trunk/framework/private/src/manifest_parser.c Wed Jun  4 
10:29:11 2014
@@ -261,7 +261,7 @@ static linked_list_pt manifestParser_par
     linked_list_pt clauseStrings = NULL;
     linked_list_pt completeList = NULL;
 
-    if (linkedList_create(completeList) == CELIX_SUCCESS) {
+    if (linkedList_create(&completeList) == CELIX_SUCCESS) {
         if (header != NULL) {
             if (strlen(header) == 0) {
                 return NULL;

Modified: incubator/celix/trunk/framework/private/src/module.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/module.c?rev=1600090&r1=1600089&r2=1600090&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/module.c (original)
+++ incubator/celix/trunk/framework/private/src/module.c Wed Jun  4 10:29:11 
2014
@@ -99,8 +99,6 @@ module_pt module_create(manifest_pt head
 
 module_pt module_createFrameworkModule(bundle_pt bundle) {
     module_pt module;
-    apr_pool_t *capabilities_pool;
-    apr_pool_t *requirements_pool;
     apr_pool_t *dependentImporters_pool;
     apr_pool_t *bundlePool = NULL;
 
@@ -108,25 +106,21 @@ module_pt module_createFrameworkModule(b
 
        module = (module_pt) apr_palloc(bundlePool, sizeof(*module));
        if (module) {
-           if (apr_pool_create(&capabilities_pool, bundlePool) == APR_SUCCESS) 
{
-               if (apr_pool_create(&requirements_pool, bundlePool) == 
APR_SUCCESS) {
-                   if (apr_pool_create(&dependentImporters_pool, bundlePool) 
== APR_SUCCESS) {
-                    module->id = apr_pstrdup(bundlePool, "0");
-                    module->symbolicName = apr_pstrdup(bundlePool, 
"framework");
-                    module->version = NULL;
-                    version_createVersion(bundlePool, 1, 0, 0, "", 
&module->version);
-
-                    linkedList_create(capabilities_pool, 
&module->capabilities);
-                    linkedList_create(requirements_pool, 
&module->requirements);
-                    module->dependentImporters = NULL;
-                    arrayList_create(&module->dependentImporters);
-                    module->wires = NULL;
-                    module->headerMap = NULL;
-                    module->resolved = false;
-                    module->bundle = bundle;
-                   }
-               }
-           }
+               if (apr_pool_create(&dependentImporters_pool, bundlePool) == 
APR_SUCCESS) {
+                       module->id = apr_pstrdup(bundlePool, "0");
+                       module->symbolicName = apr_pstrdup(bundlePool, 
"framework");
+                       module->version = NULL;
+                       version_createVersion(bundlePool, 1, 0, 0, "", 
&module->version);
+
+                       linkedList_create(&module->capabilities);
+                       linkedList_create(&module->requirements);
+                       module->dependentImporters = NULL;
+                       arrayList_create(&module->dependentImporters);
+                       module->wires = NULL;
+                       module->headerMap = NULL;
+                       module->resolved = false;
+                       module->bundle = bundle;
+               }
        }
        return module;
 }
@@ -134,6 +128,9 @@ module_pt module_createFrameworkModule(b
 void module_destroy(module_pt module) {
        arrayList_destroy(module->dependentImporters);
 
+       linkedList_destroy(module->capabilities);
+       linkedList_destroy(module->requirements);
+
        module->headerMap = NULL;
 }
 


Reply via email to