You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2008/07/28 17:11:41 UTC

svn commit: r680379 - /webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c

Author: damitha
Date: Mon Jul 28 08:11:39 2008
New Revision: 680379

URL: http://svn.apache.org/viewvc?rev=680379&view=rev
Log:
Fixing memory leaks

Modified:
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c?rev=680379&r1=680378&r2=680379&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_single_1_0/rm_echo_single.c Mon Jul 28 08:11:39 2008
@@ -43,8 +43,8 @@
     axis2_options_t *options = NULL;
     const axis2_char_t *client_home = NULL;
     axis2_svc_client_t* svc_client = NULL;
-    /*axiom_node_t *payload = NULL;
-    axiom_node_t *payload2 = NULL;*/
+    axiom_node_t *payload = NULL;
+    axiom_node_t *payload2 = NULL;
     axiom_node_t *payload3 = NULL;
     axutil_property_t *property = NULL;
     axis2_char_t *offered_seq_id = NULL;
@@ -159,7 +159,7 @@
         axis2_options_set_property(options, env, AXIS2_TIMEOUT_IN_SECONDS, 
             property);
     }
-    /*payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
+    payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
     result = axis2_svc_client_send_receive(svc_client, env, payload);
     if(result)
     {
@@ -196,7 +196,7 @@
     else
     {
         printf("\necho client two way single channel invoke FAILED!\n");
-    }*/
+    }
 
     property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
     axis2_options_set_property(options, env, "Sandesha2LastMessage", property);
@@ -220,14 +220,24 @@
     }
     AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
     AXIS2_FREE(env->allocator, seq_key);
+
     if(offered_seq_id)
+    {
         AXIS2_FREE(env->allocator, offered_seq_id);
+    }
+
     if (svc_client)
     {
         axis2_svc_client_free(svc_client, env);
         svc_client = NULL;
     }
-    
+  
+    if (env)
+    {
+        axutil_env_free((axutil_env_t *) env);
+        env = NULL;
+    }
+  
     return 0;
 }
 



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