axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r345824 - /webservices/axis2/trunk/c/modules/core/context/src/ctx.c
Date Mon, 21 Nov 2005 04:13:21 GMT
Author: samisa
Date: Sun Nov 20 20:13:16 2005
New Revision: 345824

URL: http://svn.apache.org/viewcvs?rev=345824&view=rev
Log:
Fixed few memory management problems

Modified:
    webservices/axis2/trunk/c/modules/core/context/src/ctx.c

Modified: webservices/axis2/trunk/c/modules/core/context/src/ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/src/ctx.c?rev=345824&r1=345823&r2=345824&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/src/ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/src/ctx.c Sun Nov 20 20:13:16 2005
@@ -26,7 +26,7 @@
     axis2_hash_t *non_persistent_map;
     /** persistent map */
     axis2_hash_t *persistent_map;
-    /*axis2_ctx_t *parent; This will be not required as the responsibility of 
+    /*axis2_ctx_t *parent; This will not be required as the responsibility of 
     knwong the parent is  deligated to impl structs */
 } axis2_ctx_impl_t;
 
@@ -97,11 +97,13 @@
 
     if (persistent) 
     {
-        axis2_hash_set(ctx_impl->persistent_map, key, AXIS2_HASH_KEY_STRING, value);
+        if (ctx_impl->persistent_map)
+            axis2_hash_set(ctx_impl->persistent_map, key, AXIS2_HASH_KEY_STRING, value);
     } 
     else 
     {
-        axis2_hash_set(ctx_impl->non_persistent_map, key, AXIS2_HASH_KEY_STRING, value);
+        if (ctx_impl->non_persistent_map)
+            axis2_hash_set(ctx_impl->non_persistent_map, key, AXIS2_HASH_KEY_STRING, value);
     }
     return AXIS2_SUCCESS;
 }
@@ -117,12 +119,14 @@
     
     if (persistent) 
     {
-        ret = axis2_hash_get(ctx_impl->persistent_map, key, AXIS2_HASH_KEY_STRING);
+        if (ctx_impl->persistent_map)
+            ret = axis2_hash_get(ctx_impl->persistent_map, key, AXIS2_HASH_KEY_STRING);
     }
     
     if (!ret) 
     {
-        ret = axis2_hash_get(ctx_impl->non_persistent_map, key, AXIS2_HASH_KEY_STRING);
+        if (ctx_impl->non_persistent_map)
+            ret = axis2_hash_get(ctx_impl->non_persistent_map, key, AXIS2_HASH_KEY_STRING);
     }
     /** it is the responsibility of the caller to lookup parent if key is not found here

         Note that in C implementation it is the responsibility of the deriving struct to




Mime
View raw message