Author: damitha
Date: Tue Jan 29 03:51:05 2008
New Revision: 616272

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

Modified:
    webservices/sandesha/trunk/c/include/sandesha2_constants.h
    webservices/sandesha/trunk/c/src/core/Makefile.am
    
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Tue Jan 29 
03:51:05 2008
@@ -449,6 +449,8 @@
 
        #define SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC  
"Sandesha2OriginalTransportSender"
        
+    #define SANDESHA2_ORIGINAL_MSG_RECV  "Sandesha2OriginalMessageReceiver"
+       
        #define SANDESHA2_SET_SEND_TO_TRUE  "Sandesha2SetSendToTrue"
        
        #define SANDESHA2_MESSAGE_TYPE  "Sandesha2MessageType"

Modified: webservices/sandesha/trunk/c/src/core/Makefile.am
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/Makefile.am?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/core/Makefile.am Tue Jan 29 03:51:05 2008
@@ -3,7 +3,7 @@
 
 libsandesha2_la_SOURCES = sandesha2_msg_ctx.c\
                           mod_sandesha2.c\
-                          msg_validator.c
+                          msg_validator.c 
 
 INCLUDES = -I$(top_builddir)/include \
             @AXIS2INC@ \

Modified: 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c 
(original)
+++ 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c 
Tue Jan 29 03:51:05 2008
@@ -55,6 +55,7 @@
 #include <sandesha2_msg_init.h>
 #include <sandesha2_seq_mgr.h>
 #include <sandesha2_msg_creator.h>
+#include <sandesha2_msg_recv.h>
 
 
 /** 
@@ -560,8 +561,6 @@
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
     axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
     sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
-    /*if(op_ctx)
-        axis2_op_ctx_free(op_ctx, env);*/
     if(seq_prop_mgr)
         sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
     if(create_seq_mgr)

Modified: 
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c 
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Tue 
Jan 29 03:51:05 2008
@@ -341,8 +341,6 @@
 
                 axutil_hash_this(i, &k, NULL, &v);
                 key_l = (axis2_char_t *) k;
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "key:%s", key);
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "key_l:%s", key_l);
                 if(0 == axutil_strcmp(key, key_l))
                 {
                     axis2_op_ctx_t *op_ctx = NULL;

Modified: 
webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c 
(original)
+++ webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c Tue 
Jan 29 03:51:05 2008
@@ -33,9 +33,8 @@
 };
 
 #define SANDESHA2_INTF_TO_IMPL(transport_sender) \
-                        ((sandesha2_transport_sender_impl_t 
*)(transport_sender))
+    ((sandesha2_transport_sender_impl_t *)(transport_sender))
 
-/***************************** Function headers 
*******************************/
 axis2_status_t AXIS2_CALL
 sandesha2_transport_sender_init(
     axis2_transport_sender_t *transport_sender,
@@ -60,8 +59,6 @@
     axis2_transport_sender_t *transport_sender,
     const axutil_env_t *env);                                                  
        
 
-/***************************** End of function headers 
************************/
-
 static const axis2_transport_sender_ops_t sandesha2_transport_sender_ops_var = 
{
     sandesha2_transport_sender_init,
     sandesha2_transport_sender_invoke,
@@ -74,27 +71,14 @@
     const axutil_env_t *env)
 {
     sandesha2_transport_sender_impl_t *transport_sender_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
-    
     transport_sender_impl =  (sandesha2_transport_sender_impl_t *)
-                        AXIS2_MALLOC (env->allocator, 
-                        sizeof(sandesha2_transport_sender_impl_t));
-       
-    if(NULL == transport_sender_impl)
+        AXIS2_MALLOC (env->allocator, 
+        sizeof(sandesha2_transport_sender_impl_t));
+    if(!transport_sender_impl)
        {
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
AXIS2_FAILURE);
         return NULL;
        }
-        
-    transport_sender_impl->transport_sender.ops = AXIS2_MALLOC(env->allocator,
-                        sizeof(axis2_transport_sender_ops_t));
-    if(NULL == transport_sender_impl->transport_sender.ops)
-       {
-               sandesha2_transport_sender_free((axis2_transport_sender_t*)
-                        transport_sender_impl, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-       }
     transport_sender_impl->transport_sender.ops = 
&sandesha2_transport_sender_ops_var; 
        return &(transport_sender_impl->transport_sender);
 }
@@ -105,8 +89,6 @@
     axis2_transport_sender_t *transport_sender, 
     const axutil_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-       
        AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(transport_sender));
 }
 
@@ -117,10 +99,8 @@
     axis2_conf_ctx_t *conf_ctx,
     axis2_transport_out_desc_t *transport_out)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, transport_out, AXIS2_FAILURE);
-    
     /* we have nothing to do here */
     return AXIS2_SUCCESS;
 }
@@ -131,9 +111,7 @@
     const axutil_env_t *env,
     axis2_msg_ctx_t *msg_ctx)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-        
     /* we have nothing to do here */
     return AXIS2_SUCCESS;
 }
@@ -157,10 +135,8 @@
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
          "[sandesha2]Entry:sandesha2_transport_sender_invoke");
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-        
     property = axis2_msg_ctx_get_property(msg_ctx, env, 
-                        SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC);
-                        
+        SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC);
     if(NULL == property || NULL == axutil_property_get_value(property, env))
         return AXIS2_FAILURE;
     out_desc = axutil_property_get_value(property, env);

Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?rev=616272&r1=616271&r2=616272&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Tue Jan 29 
03:51:05 2008
@@ -618,6 +618,11 @@
     {
         axiom_soap_envelope_free(res_envelope, env);
     }
+    if(msg_type == SANDESHA2_MSG_TYPE_CREATE_SEQ)
+    {
+        axis2_op_ctx_t *op_ctx = axis2_msg_ctx_get_op_ctx(res_msg_ctx, env);
+        axis2_op_ctx_free(op_ctx, env);
+    }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2]Exit:sandesha2_sender_worker_check_for_sync_res");
     return AXIS2_SUCCESS;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to