[IBAL] Call um_close_ca after child resources are released.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Mar 2006 17:17:21 +0000 (17:17 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Mar 2006 17:17:21 +0000 (17:17 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@226 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_ca.c

index f1bbf59..7ebacd5 100644 (file)
@@ -51,12 +51,12 @@ static void
 __destroying_ca(\r
        IN                              struct _al_obj                          *p_obj );\r
 \r
-void\r
-cleanup_ca(\r
+static void\r
+__cleanup_ca(\r
        IN                              struct _al_obj                          *p_obj );\r
 \r
-void\r
-free_ca(\r
+static void\r
+__free_ca(\r
        IN                              struct _al_obj                          *p_obj );\r
 \r
 \r
@@ -123,10 +123,10 @@ open_ca(
        h_ca->pfn_event_cb = pfn_ca_event_cb;\r
 \r
        status = init_al_obj( &h_ca->obj, ca_context, TRUE,\r
-               __destroying_ca, cleanup_ca, free_ca );\r
+               NULL, __cleanup_ca, __free_ca );\r
        if( status != IB_SUCCESS )\r
        {\r
-               free_ca( &h_ca->obj );\r
+               __free_ca( &h_ca->obj );\r
                CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
                return status;\r
        }\r
@@ -194,8 +194,11 @@ ib_close_ca(
 }\r
 \r
 \r
+/*\r
+ * Release all resources associated with the CA.\r
+ */\r
 static void\r
-__destroying_ca(\r
+__cleanup_ca(\r
        IN                              struct _al_obj                          *p_obj )\r
 {\r
 #if defined(CL_KERNEL)\r
@@ -208,19 +211,8 @@ __destroying_ca(
                h_ca->obj.p_ci_ca->verbs.um_close_ca(\r
                        h_ca->obj.p_ci_ca->h_ci_ca, h_ca->h_um_ca );\r
        }\r
-#else\r
-       UNUSED_PARAM( p_obj );\r
 #endif\r
-}\r
 \r
-\r
-/*\r
- * Release all resources associated with the CA.\r
- */\r
-void\r
-cleanup_ca(\r
-       IN                              struct _al_obj                          *p_obj )\r
-{\r
        /* It is now safe to release the CI CA. */\r
        if( p_obj->p_ci_ca )\r
                release_ci_ca( PARENT_STRUCT( p_obj, ib_ca_t, obj ) );\r
@@ -228,8 +220,8 @@ cleanup_ca(
 \r
 \r
 \r
-void\r
-free_ca(\r
+static void\r
+__free_ca(\r
        IN                              struct _al_obj                          *p_obj )\r
 {\r
        ib_ca_handle_t                  h_ca;\r