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 sa...@apache.org on 2006/11/19 06:19:29 UTC

svn commit: r476717 - in /webservices/axis2/trunk/c: modules/core/clientapi/options.c modules/core/clientapi/svc_client.c samples/user_guide/clients/echo_rest.c

Author: samisa
Date: Sat Nov 18 21:19:26 2006
New Revision: 476717

URL: http://svn.apache.org/viewvc?view=rev&rev=476717
Log:
More memoryleak fixes.

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/options.c
    webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
    webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/options.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/options.c?view=diff&rev=476717&r1=476716&r2=476717
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/options.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/options.c Sat Nov 18 21:19:26 2006
@@ -1145,6 +1145,28 @@
 
     if (options_impl->properties)
     {
+        axis2_hash_index_t *hi = NULL;
+        void *val = NULL;
+        const void *key = NULL;
+        for (hi = axis2_hash_first(options_impl->properties, env);
+                hi; hi = axis2_hash_next(env, hi))
+        {
+            axis2_property_t *property = NULL;
+
+            axis2_hash_this(hi, &key, NULL, &val);
+            property = (axis2_property_t *) val;
+
+            if (property)
+            {
+                AXIS2_PROPERTY_FREE(property, env);
+                property = NULL;
+            }
+
+            val = NULL;
+            key = NULL;
+        }
+
+
         axis2_hash_free(options_impl->properties, env);
         options_impl->properties = NULL;
     }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?view=diff&rev=476717&r1=476716&r2=476717
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Sat Nov 18 21:19:26 2006
@@ -1350,16 +1350,16 @@
         svc_client_impl->callback_recv = NULL;
     }
 
-    if (svc_client_impl->conf_ctx)
-    {
-        AXIS2_CONF_CTX_FREE(svc_client_impl->conf_ctx, env);
-        svc_client_impl->conf_ctx = NULL;
-    }
-
     if (svc_client_impl->options)
     {
         AXIS2_OPTIONS_FREE(svc_client_impl->options, env);
         svc_client_impl->options = NULL;
+    }
+
+    if (svc_client_impl->conf_ctx)
+    {
+        AXIS2_CONF_CTX_FREE(svc_client_impl->conf_ctx, env);
+        svc_client_impl->conf_ctx = NULL;
     }
 
     if (svc_client_impl->listener_manager)

Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c?view=diff&rev=476717&r1=476716&r2=476717
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Sat Nov 18 21:19:26 2006
@@ -31,6 +31,7 @@
     axiom_node_t *payload = NULL;
     axiom_node_t *ret_node = NULL;
     axis2_bool_t method_get = AXIS2_FALSE;
+    axis2_property_t *rest_property = NULL;
 
     /* Set up the environment */
     env = axis2_env_create_all("echo_rest.log", AXIS2_LOG_LEVEL_TRACE);
@@ -77,8 +78,10 @@
     options = axis2_options_create(env);
     AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
     /* Enable REST at the client side */
+    rest_property = axis2_property_create(env);
+    AXIS2_PROPERTY_SET_VALUE(rest_property, env, AXIS2_VALUE_TRUE);
     AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_ENABLE_REST,
-            AXIS2_VALUE_TRUE);
+            rest_property);
     if (AXIS2_TRUE == method_get)
     {
         AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_HTTP_METHOD,



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