axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r554918 - in /webservices/axis2/trunk/c/neethi: include/ src/secpolicy/model/
Date Tue, 10 Jul 2007 12:08:35 GMT
Author: manjula
Date: Tue Jul 10 05:08:34 2007
New Revision: 554918

URL: http://svn.apache.org/viewvc?view=rev&rev=554918
Log:
Adding ref count to fix memory leaks.

Modified:
    webservices/axis2/trunk/c/neethi/include/rp_asymmetric_binding.h
    webservices/axis2/trunk/c/neethi/include/rp_https_token.h
    webservices/axis2/trunk/c/neethi/include/rp_rampart_config.h
    webservices/axis2/trunk/c/neethi/include/rp_security_context_token.h
    webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_elements.h
    webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_parts.h
    webservices/axis2/trunk/c/neethi/include/rp_symmetric_binding.h
    webservices/axis2/trunk/c/neethi/include/rp_transport_binding.h
    webservices/axis2/trunk/c/neethi/include/rp_wss11.h
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c

Modified: webservices/axis2/trunk/c/neethi/include/rp_asymmetric_binding.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_asymmetric_binding.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_asymmetric_binding.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_asymmetric_binding.h Tue Jul 10 05:08:34 2007
@@ -74,6 +74,12 @@
         rp_asymmetric_binding_t *asymmetric_binding,
         const axutil_env_t *env);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_asymmetric_binding_increment_ref(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env);
+    
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_https_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_https_token.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_https_token.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_https_token.h Tue Jul 10 05:08:34 2007
@@ -65,6 +65,12 @@
             const axutil_env_t *env,
             axis2_bool_t require_client_certificate);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_https_token_increment_ref(
+            rp_https_token_t *https_token,
+            const axutil_env_t *env);
+    
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_rampart_config.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_rampart_config.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_rampart_config.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_rampart_config.h Tue Jul 10 05:08:34 2007
@@ -137,6 +137,11 @@
                                 const axutil_env_t *env,
                                 axis2_char_t *rd_val);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_rampart_config_increment_ref(
+            rp_rampart_config_t *rampart_config,
+            const axutil_env_t *env);
+    
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/neethi/include/rp_security_context_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_security_context_token.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_security_context_token.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_security_context_token.h Tue Jul 10 05:08:34
2007
@@ -83,6 +83,12 @@
         const axutil_env_t *env,
         axis2_bool_t sc10_security_context_token);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_security_context_token_increment_ref(
+        rp_security_context_token_t *security_context_token,
+        const axutil_env_t *env);
+            
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_elements.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_elements.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_elements.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_elements.h Tue Jul 10 05:08:34
2007
@@ -68,6 +68,12 @@
             const axutil_env_t *env,
             axis2_char_t *xpath_version);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_signed_encrypted_elements_increment_ref(
+            rp_signed_encrypted_elements_t *signed_encrypted_elements,
+            const axutil_env_t *env);
+
+
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_parts.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_parts.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_parts.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_signed_encrypted_parts.h Tue Jul 10 05:08:34
2007
@@ -68,6 +68,12 @@
         const axutil_env_t *env,
         rp_header_t *header);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_signed_encrypted_parts_increment_ref(
+        rp_signed_encrypted_parts_t *signed_encrypted_parts,
+        const axutil_env_t *env);
+    
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_symmetric_binding.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_symmetric_binding.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_symmetric_binding.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_symmetric_binding.h Tue Jul 10 05:08:34 2007
@@ -85,6 +85,12 @@
         rp_symmetric_binding_t *symmetric_binding,
         const axutil_env_t *env);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_symmetric_binding_increment_ref(
+        rp_symmetric_binding_t *symmetric_binding,
+        const axutil_env_t *env);
+    
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_transport_binding.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_transport_binding.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_transport_binding.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_transport_binding.h Tue Jul 10 05:08:34 2007
@@ -63,6 +63,12 @@
         rp_transport_binding_t *transport_binding,
         const axutil_env_t *env);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_transport_binding_increment_ref(
+        rp_transport_binding_t *tansport_binding,
+        const axutil_env_t *env);
+    
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/neethi/include/rp_wss11.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_wss11.h?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_wss11.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_wss11.h Tue Jul 10 05:08:34 2007
@@ -101,6 +101,12 @@
     rp_wss11_get_require_signature_confirmation(rp_wss11_t *wss11,
             const axutil_env_t *env);
 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_wss11_increment_ref(
+            rp_wss11_t *wss11,
+            const axutil_env_t *env);
+    
+
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c Tue Jul 10 05:08:34
2007
@@ -23,6 +23,7 @@
     rp_symmetric_asymmetric_binding_commons_t *symmetric_asymmetric_binding_commons;
     rp_property_t *initiator_token;
     rp_property_t *recipient_token;
+    int ref;
 };
 
 AXIS2_EXTERN rp_asymmetric_binding_t *AXIS2_CALL 
@@ -43,7 +44,8 @@
     asymmetric_binding->symmetric_asymmetric_binding_commons = NULL;
     asymmetric_binding->initiator_token = NULL;
     asymmetric_binding->recipient_token = NULL;
-    
+    asymmetric_binding->ref = 0;
+
     return asymmetric_binding;
 
 }
@@ -57,6 +59,12 @@
     
     if(asymmetric_binding)
     {
+
+        if (--(asymmetric_binding->ref) > 0)
+        {
+            return;
+        }
+
         if(asymmetric_binding->symmetric_asymmetric_binding_commons)
         {
             rp_symmetric_asymmetric_binding_commons_free(
@@ -157,3 +165,14 @@
         
     return asymmetric_binding->recipient_token;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_asymmetric_binding_increment_ref(
+    rp_asymmetric_binding_t *asymmetric_binding,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    asymmetric_binding->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c Tue Jul 10 05:08:34
2007
@@ -23,6 +23,7 @@
     axis2_char_t *inclusion;
     axis2_bool_t derivedkeys;
     axis2_bool_t require_client_certificate;
+    int ref;
 };
 
 AXIS2_EXTERN rp_https_token_t *AXIS2_CALL 
@@ -43,7 +44,8 @@
     https_token->inclusion = RP_INCLUDE_ALWAYS;
     https_token->derivedkeys = AXIS2_FALSE;
     https_token->require_client_certificate = AXIS2_FALSE;
-  
+    https_token->ref = 0;
+
     return https_token;
 
 }
@@ -56,6 +58,10 @@
     
     if(https_token)
     {
+        if (--(https_token->ref) > 0)
+        {
+            return;
+        }
         AXIS2_FREE(env->allocator, https_token);
         https_token = NULL;
     }
@@ -131,3 +137,14 @@
 
     return AXIS2_SUCCESS;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_https_token_increment_ref(
+    rp_https_token_t *https_token,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    https_token->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c Tue Jul 10 05:08:34
2007
@@ -30,6 +30,7 @@
     axis2_char_t *certificate_file;
     axis2_char_t *private_key_file;
     axis2_char_t *rd_val;
+    int ref;
 };
 
 AXIS2_EXTERN rp_rampart_config_t *AXIS2_CALL 
@@ -57,6 +58,8 @@
     rampart_config->password_type = NULL;
     rampart_config->time_to_live = NULL;
     rampart_config->rd_val = NULL;
+    rampart_config->ref = 0;
+
     return rampart_config;
 }
 
@@ -68,6 +71,11 @@
 
     if(rampart_config)
     {
+        if (--(rampart_config->ref) > 0)
+        {
+            return;
+        }
+        
         AXIS2_FREE(env->allocator,rampart_config);
         rampart_config = NULL;
     }
@@ -297,6 +305,16 @@
     AXIS2_PARAM_CHECK(env->error, rd_val, AXIS2_FAILURE);
 
     rampart_config->rd_val = rd_val;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_rampart_config_increment_ref(
+    rp_rampart_config_t *rampart_config,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    rampart_config->ref++;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c Tue Jul
10 05:08:34 2007
@@ -25,6 +25,7 @@
     axis2_bool_t derivedkeys;
     axis2_bool_t require_external_uri_ref;
     axis2_bool_t sc10_security_context_token;
+    int ref;
 };
 
 AXIS2_EXTERN rp_security_context_token_t *AXIS2_CALL 
@@ -46,7 +47,8 @@
     security_context_token->derivedkeys = AXIS2_FALSE;
     security_context_token->require_external_uri_ref = AXIS2_FALSE;
     security_context_token->sc10_security_context_token = AXIS2_FALSE;
-    
+    security_context_token->ref = 0;
+
     return security_context_token;
 
 }
@@ -60,6 +62,11 @@
     
     if(security_context_token)
     {
+        if (--(security_context_token->ref) > 0)
+        {
+            return;
+        }
+        
         AXIS2_FREE(env->allocator, security_context_token);
         security_context_token = NULL;
     }
@@ -164,3 +171,14 @@
 
     return AXIS2_SUCCESS;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_security_context_token_increment_ref(
+    rp_security_context_token_t *security_context_token,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    security_context_token->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c Tue Jul
10 05:08:34 2007
@@ -24,6 +24,7 @@
     axis2_bool_t signedelements;
     axutil_array_list_t *xpath_expressions;
     axis2_char_t *xpath_version;
+    int ref;
 
 };
 
@@ -53,6 +54,7 @@
     }
     
     signed_encrypted_elements->xpath_version = NULL;
+    signed_encrypted_elements->ref = 0;
 
     return signed_encrypted_elements;
 
@@ -66,6 +68,10 @@
     
     if(signed_encrypted_elements)
     {
+        if (--(signed_encrypted_elements->ref) > 0)
+        {
+            return;
+        }
         
         if(signed_encrypted_elements->xpath_expressions)
         {
@@ -159,3 +165,14 @@
     signed_encrypted_elements->xpath_version = xpath_version;
     return AXIS2_SUCCESS;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_signed_encrypted_elements_increment_ref(
+    rp_signed_encrypted_elements_t *signed_encrypted_elements,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    signed_encrypted_elements->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c Tue Jul
10 05:08:34 2007
@@ -24,7 +24,7 @@
     axis2_bool_t body;
     axis2_bool_t signedparts;
     axutil_array_list_t *headers;
-
+    int ref;
 };
 
 AXIS2_EXTERN rp_signed_encrypted_parts_t *AXIS2_CALL 
@@ -64,7 +64,10 @@
     
     if(signed_encrypted_parts)
     {
-        
+        if (--(signed_encrypted_parts->ref) > 0)
+        {
+            return;
+        }
         if(signed_encrypted_parts->headers)
         {
             int i = 0;
@@ -81,6 +84,7 @@
             }
             axutil_array_list_free(signed_encrypted_parts->headers, env);
             signed_encrypted_parts->headers = NULL;
+            signed_encrypted_parts->ref = 0;
 
         }
         AXIS2_FREE(env->allocator,signed_encrypted_parts);
@@ -156,3 +160,13 @@
     return AXIS2_SUCCESS;
 }
 
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_signed_encrypted_parts_increment_ref(
+    rp_signed_encrypted_parts_t *signed_encrypted_parts,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    signed_encrypted_parts->ref++;
+    return AXIS2_SUCCESS;
+}

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c Tue Jul 10 05:08:34
2007
@@ -25,6 +25,7 @@
     rp_property_t *protection_token;
     rp_property_t *signature_token;
     rp_property_t *encryption_token;
+    int ref;
 };
 
 AXIS2_EXTERN rp_symmetric_binding_t *AXIS2_CALL 
@@ -46,7 +47,8 @@
     symmetric_binding->protection_token = NULL;
     symmetric_binding->signature_token = NULL;
     symmetric_binding->encryption_token = NULL;
-    
+    symmetric_binding->ref = 0;
+
     return symmetric_binding;
 }
 
@@ -59,6 +61,11 @@
     
     if(symmetric_binding)
     {
+        if (--(symmetric_binding->ref) > 0)
+        {
+            return;
+        }
+
         if(symmetric_binding->symmetric_asymmetric_binding_commons)
         {
             rp_symmetric_asymmetric_binding_commons_free(
@@ -203,3 +210,14 @@
     
     return symmetric_binding->signature_token;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_symmetric_binding_increment_ref(
+    rp_symmetric_binding_t *symmetric_binding,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    symmetric_binding->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c Tue Jul 10 05:08:34
2007
@@ -23,6 +23,7 @@
 {
     rp_binding_commons_t *binding_commons;
     rp_property_t *transport_token;
+    int ref;
 };
 
 AXIS2_EXTERN rp_transport_binding_t *AXIS2_CALL 
@@ -42,7 +43,8 @@
     }
     transport_binding->binding_commons = NULL;
     transport_binding->transport_token = NULL;
-    
+    transport_binding->ref = 0;
+
     return transport_binding;
 
 }
@@ -56,6 +58,10 @@
     
     if(transport_binding)
     {
+        if (--(transport_binding->ref) > 0)
+        { 
+            return;
+        }
         if(transport_binding->binding_commons)
         {
             rp_binding_commons_free(transport_binding->binding_commons,env);
@@ -122,3 +128,14 @@
     transport_binding->transport_token = transport_token; 
     return AXIS2_SUCCESS;
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_transport_binding_increment_ref(
+    rp_transport_binding_t *transport_binding,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    transport_binding->ref++;
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c?view=diff&rev=554918&r1=554917&r2=554918
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c Tue Jul 10 05:08:34 2007
@@ -29,6 +29,7 @@
     axis2_bool_t must_support_ref_encryptedkey;
     axis2_bool_t require_signature_confirmation;
     axis2_bool_t must_support_direct_reference;
+    int ref;
 };
 
 AXIS2_EXTERN rp_wss11_t *AXIS2_CALL
@@ -54,6 +55,7 @@
     wss11->must_support_ref_encryptedkey = AXIS2_FALSE;
     wss11->require_signature_confirmation = AXIS2_FALSE;
     wss11->must_support_direct_reference = AXIS2_TRUE;
+    wss11->ref = 0;
 
     return wss11;
 
@@ -67,6 +69,10 @@
     
     if(wss11)
     {
+        if (--(wss11->ref) > 0)
+        {
+            return;
+        }
         AXIS2_FREE(env->allocator, wss11);
         wss11 = NULL;
     }
@@ -228,3 +234,14 @@
     return AXIS2_SUCCESS;
     
 }
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_wss11_increment_ref(
+    rp_wss11_t *wss11,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wss11->ref++;
+    return AXIS2_SUCCESS;
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message