Author: damitha
Date: Sat May 31 23:16:18 2008
New Revision: 662149

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

Modified:
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_msg_creator.h
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_msg_creator.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_msg_creator.h?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_msg_creator.h
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_msg_creator.h
 Sat May 31 23:16:18 2008
@@ -57,8 +57,6 @@
     sandesha2_msg_ctx_t *application_rm_msg, 
     axis2_char_t *internal_seq_id,
     axis2_char_t *acks_to,
-    axis2_char_t *spec_version,
-    axis2_char_t *addr_ns_value,
     sandesha2_seq_property_mgr_t *seq_prop_mgr);
 
 /**

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
 Sat May 31 23:16:18 2008
@@ -78,6 +78,14 @@
     axis2_char_t *spec_version,
     struct sandesha2_seq_property_mgr *seq_prop_mgr);
 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+sandesha2_seq_mgr_setup_temporary_rms_sequence(
+    const axutil_env_t *env,
+    axis2_msg_ctx_t *first_app_msg,
+    axis2_char_t *rms_internal_sequence_id,
+    axis2_char_t *spec_version,
+    struct sandesha2_seq_property_mgr *seq_prop_mgr);
+
 /** @} */
 #ifdef __cplusplus
 }

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
 Sat May 31 23:16:18 2008
@@ -115,8 +115,6 @@
     sandesha2_msg_ctx_t *msg_ctx,
     axis2_char_t *internal_seq_id,
     axis2_char_t *acks_to,
-    axis2_char_t *spec_version,
-    axis2_char_t *addr_ns_value,
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
@@ -345,6 +343,7 @@
     seq = sandesha2_msg_ctx_get_sequence(rm_msg_ctx, env);
     sandesha2_seq_set_must_understand(seq, env, AXIS2_FALSE);
     rmd_sequence_id = 
sandesha2_identifier_get_identifier(sandesha2_seq_get_identifier(seq, env), 
env);
+    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "rmd_sequence_id:%s", 
rmd_sequence_id);
     fault_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,rm_msg_ctx, 
rmd_sequence_id, seq_prop_mgr, 
             create_seq_mgr, next_msg_mgr);
     if(fault_ctx)
@@ -1396,9 +1395,8 @@
         }
 
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Spec version:%s", spec_ver);
-
-        sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx, 
rms_internal_sequence_id, spec_ver, 
-                seq_prop_mgr);
+        sandesha2_seq_mgr_setup_temporary_rms_sequence(env, msg_ctx, 
rms_internal_sequence_id, spec_ver, 
+            seq_prop_mgr);
 
         if(send_create_seq)
         {
@@ -1498,9 +1496,12 @@
                  */
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "acks_to:%s", acks_to);
                 sandesha2_app_msg_processor_send_create_seq_msg(env, 
rm_msg_ctx, rms_internal_sequence_id, 
-                        acks_to, spec_ver, addr_ns_uri, storage_mgr, 
seq_prop_mgr, create_seq_mgr, sender_mgr);
+                        acks_to, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);
             }
         }
+        sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx, 
rms_internal_sequence_id, spec_ver, 
+                seq_prop_mgr);
+        
     }
 
     /* A dummy message is a one which will not be processed as a actual 
@@ -1816,8 +1817,6 @@
     sandesha2_msg_ctx_t *rm_msg_ctx,
     axis2_char_t *rms_internal_sequence_id,
     axis2_char_t *acks_to,
-    axis2_char_t *spec_version,
-    axis2_char_t *addr_ns_value,
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
@@ -1850,14 +1849,11 @@
     AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, sender_mgr, AXIS2_FAILURE);
   
-    if(addr_ns_value)
-    {
-        addr_ns_uri = axutil_strdup(env, addr_ns_value);
-    }
-
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
+
     create_seq_rm_msg = sandesha2_msg_creator_create_create_seq_msg(env, 
rm_msg_ctx, rms_internal_sequence_id, 
-            acks_to, spec_version, addr_ns_value, seq_prop_mgr);
+            acks_to, seq_prop_mgr);
+
     if(!create_seq_rm_msg)
     {
         return AXIS2_FAILURE;

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
 Sat May 31 23:16:18 2008
@@ -384,7 +384,7 @@
         
         acks_to = (axis2_char_t *) axis2_endpoint_ref_get_address(acks_to_epr, 
env);
         create_seq_rm_msg = sandesha2_msg_creator_create_create_seq_msg(env, 
rm_msg_ctx, 
-                rms_internal_sequence_id, acks_to, NULL, NULL, seq_prop_mgr);
+                rms_internal_sequence_id, acks_to, seq_prop_mgr);
 
         if(!create_seq_rm_msg)
         {
@@ -485,6 +485,7 @@
             sandesha2_utils_start_polling_mgr(env, conf_ctx, 
rms_internal_sequence_id);
         }
 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "came3");
         sandesha2_next_msg_mgr_insert(next_msg_mgr, env, next_bean);
         
         spec_ver_bean = sandesha2_seq_property_bean_create_with_data(env, 
rmd_sequence_id, 

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
 Sat May 31 23:16:18 2008
@@ -80,8 +80,6 @@
     sandesha2_msg_ctx_t *application_rm_msg, 
     axis2_char_t *internal_seq_id,
     axis2_char_t *acks_to,
-    axis2_char_t *spec_version,
-    axis2_char_t *addr_ns_value,
     sandesha2_seq_property_mgr_t *seq_prop_mgr)
 {
     axis2_msg_ctx_t *application_msg_ctx = NULL;
@@ -111,16 +109,6 @@
     sandesha2_acks_to_t *temp_acks_to = NULL;
     axutil_property_t *property = NULL;
 
-    if(spec_version)
-    {
-        rm_version = axutil_strdup(env, spec_version);
-    }
-
-    if(addr_ns_value)
-    {
-        addressing_ns_value = axutil_strdup(env, addr_ns_value);
-    }
-
     application_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(application_rm_msg, 
env);
     if(!application_msg_ctx)
     {

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c?rev=662149&r1=662148&r2=662149&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
 Sat May 31 23:16:18 2008
@@ -500,3 +500,67 @@
     return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+sandesha2_seq_mgr_setup_temporary_rms_sequence(
+    const axutil_env_t *env,
+    axis2_msg_ctx_t *first_app_msg,
+    axis2_char_t *rms_internal_sequence_id,
+    axis2_char_t *spec_version,
+    sandesha2_seq_property_mgr_t *seq_prop_mgr)
+{
+    axis2_char_t *addr_ns_val = NULL;
+    axutil_property_t *property = NULL;
+    sandesha2_seq_property_bean_t *addr_ns_bean = NULL;
+    sandesha2_seq_property_bean_t *spec_version_bean = NULL;
+   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] 
Entry:sandesha2_seq_mgr_setup_temporary_rms_sequence");
+
+    AXIS2_PARAM_CHECK(env->error, first_app_msg, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, rms_internal_sequence_id, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, spec_version, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, AXIS2_FAILURE);
+    
+    property = axis2_msg_ctx_get_property(first_app_msg, env, 
AXIS2_WSA_VERSION);
+    if(property)
+    {
+        addr_ns_val = axutil_property_get_value(property, env);
+    }
+
+    if(!addr_ns_val)
+    {
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_msg_ctx_t *req_msg_ctx = NULL;
+
+        op_ctx = axis2_msg_ctx_get_op_ctx(first_app_msg, env);
+        req_msg_ctx =  axis2_op_ctx_get_msg_ctx(op_ctx, env, 
AXIS2_WSDL_MESSAGE_LABEL_IN);
+
+        if(req_msg_ctx)
+        {
+            property = axis2_msg_ctx_get_property(req_msg_ctx, env, 
AXIS2_WSA_VERSION);
+            if(property)
+            {
+                addr_ns_val = axutil_property_get_value(property, env);
+            }
+        }
+    }
+
+    if(!addr_ns_val)
+    {
+        addr_ns_val = AXIS2_WSA_NAMESPACE;
+    }
+        
+    addr_ns_bean = sandesha2_seq_property_bean_create_with_data(env, 
rms_internal_sequence_id, 
+            SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, addr_ns_val);
+
+    sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, addr_ns_bean);
+    
+    spec_version_bean = sandesha2_seq_property_bean_create_with_data(env, 
rms_internal_sequence_id, 
+            SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, spec_version);
+
+    sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, spec_version_bean);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] 
Exit:sandesha2_seq_mgr_setup_temporary_rms_sequence");
+
+    return AXIS2_SUCCESS;
+}
+



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

Reply via email to