You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sh...@apache.org on 2008/12/24 06:04:12 UTC

svn commit: r729231 - in /webservices/axis2/trunk/c/util: include/axutil_env.h src/env.c

Author: shankar
Date: Tue Dec 23 21:04:12 2008
New Revision: 729231

URL: http://svn.apache.org/viewvc?rev=729231&view=rev
Log:
Fix for issue AXIS2C-1315

Modified:
    webservices/axis2/trunk/c/util/include/axutil_env.h
    webservices/axis2/trunk/c/util/src/env.c

Modified: webservices/axis2/trunk/c/util/include/axutil_env.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_env.h?rev=729231&r1=729230&r2=729231&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_env.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_env.h Tue Dec 23 21:04:12 2008
@@ -175,16 +175,21 @@
     axutil_env_free(
         axutil_env_t * env);
 
+
+    #define AXIS_ENV_FREE_LOG        0x1
+    #define AXIS_ENV_FREE_ERROR      0x2
+    #define AXIS_ENV_FREE_THREADPOOL 0x4
+
     /**
      * Frees the environment components based on the mask.
      * @param env pointer to environment struct to be freed
      * @param mask bit pattern indicating which components of the env 
      * struct are to be freed
-     *       0x1 - Frees the log
-     *       0x2 - Frees the error
-     *       0x4 - Frees the thread pool
+     *       AXIS_ENV_FREE_LOG        - Frees the log
+     *       AXIS_ENV_FREE_ERROR      - Frees the error
+     *       AXIS_ENV_FREE_THREADPOOL - Frees the thread pool
      *       You can use combinations to free multiple components as well
-     *       E.g : 0x3 frees both log and error, but not the thread pool
+     *       E.g : AXIS_ENV_FREE_LOG | AXIS_ENV_FREE_ERROR frees both log and error, but not the thread pool
      * @return void
      */
     AXIS2_EXTERN void AXIS2_CALL

Modified: webservices/axis2/trunk/c/util/src/env.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/env.c?rev=729231&r1=729230&r2=729231&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/env.c (original)
+++ webservices/axis2/trunk/c/util/src/env.c Tue Dec 23 21:04:12 2008
@@ -267,17 +267,17 @@
         return;
     }
 
-    if (mask & 0x1)
+    if (mask & AXIS_ENV_FREE_LOG)
     {
         AXIS2_LOG_FREE(env->allocator, env->log);
     }
     
-    if (mask & 0x2)
+    if (mask & AXIS_ENV_FREE_ERROR)
     {
         AXIS2_ERROR_FREE(env->error);
     }
     
-    if (mask & 0x4)
+    if (mask & AXIS_ENV_FREE_THREADPOOL)
     {
         axutil_thread_pool_free(env->thread_pool);
     }