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 ma...@apache.org on 2008/12/23 18:54:23 UTC

svn commit: r729049 - /webservices/axis2/trunk/c/util/src/env.c

Author: manjula
Date: Tue Dec 23 09:54:23 2008
New Revision: 729049

URL: http://svn.apache.org/viewvc?rev=729049&view=rev
Log:
Fixing Axis2C-1320.

Modified:
    webservices/axis2/trunk/c/util/src/env.c

Modified: webservices/axis2/trunk/c/util/src/env.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/env.c?rev=729049&r1=729048&r2=729049&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/env.c (original)
+++ webservices/axis2/trunk/c/util/src/env.c Tue Dec 23 09:54:23 2008
@@ -71,27 +71,23 @@
     if (!allocator || !error)
         return NULL;
 
-    env = axutil_env_create(allocator);
+    env = (axutil_env_t *) AXIS2_MALLOC(allocator, sizeof(axutil_env_t));
 
     if (!env)
         return NULL;
 
+    memset(env, 0, sizeof(axutil_env_t));
+
     env->allocator = allocator;
     env->error = error;
+    env->log = log;
 
-    if (!log)
-    {
-        env->log_enabled = AXIS2_FALSE;
-    }
-    else
-    {
+    if (env->log)
         env->log_enabled = AXIS2_TRUE;
-        if (env->log) /* free the default log */
-        {
-            AXIS2_LOG_FREE(env->allocator, env->log);
-        }
-        env->log = log; /* set the given log */
-    }
+    else
+        env->log_enabled = AXIS2_FALSE;
+
+    axutil_error_init();
 
     env->ref = 1;