axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r576272 - /webservices/axis2/trunk/c/src/core/engine/phase.c
Date Mon, 17 Sep 2007 06:45:55 GMT
Author: manjula
Date: Sun Sep 16 23:45:55 2007
New Revision: 576272

URL: http://svn.apache.org/viewvc?rev=576272&view=rev
Log:
Adding a ref count to axis2_phase_t

Modified:
    webservices/axis2/trunk/c/src/core/engine/phase.c

Modified: webservices/axis2/trunk/c/src/core/engine/phase.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/phase.c?rev=576272&r1=576271&r2=576272&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/phase.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/phase.c Sun Sep 16 23:45:55 2007
@@ -53,6 +53,8 @@
      * that is for this phase there is only one handler
      */
     axis2_bool_t is_one_handler;
+
+    int ref;
 };
 
 AXIS2_EXTERN axis2_phase_t *AXIS2_CALL
@@ -78,6 +80,7 @@
     phase->last_handler = NULL;
     phase->last_handler_set = AXIS2_FALSE;
     phase->is_one_handler = AXIS2_FALSE;
+    phase->ref = 1;
 
     phase->handlers = axutil_array_list_create(env, 10);
     if (!(phase->handlers))
@@ -976,6 +979,11 @@
 {
     AXIS2_ENV_CHECK(env, void);
 
+    if (--(phase->ref) > 0)
+    {
+        return;
+    }
+    
     if (phase->name)
     {
         AXIS2_FREE(env->allocator, phase->name);
@@ -1075,6 +1083,15 @@
     }
     if (AXIS2_TRUE == remove_handler)
         axutil_array_list_remove(list, env, i);
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_increment_ref(axis2_phase_t *phase,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    phase->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