Author: damitha
Date: Sun Nov  1 17:18:49 2009
New Revision: 831712

URL: http://svn.apache.org/viewvc?rev=831712&view=rev
Log:

Get spec version from policy

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
    webservices/sandesha/trunk/c/src/util/msg_creator.c
    webservices/sandesha/trunk/c/src/util/msg_init.c
    webservices/sandesha/trunk/c/src/util/property_bean.c
    webservices/sandesha/trunk/c/src/util/property_mgr.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c

Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Nov  
1 17:18:49 2009
@@ -1861,7 +1861,7 @@
     one_way = AXIS2_MEP_CONSTANT_IN_ONLY == mep;
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "MEP:%d", mep);
 
-    rm_version = sandesha2_utils_get_rm_version(env, incoming_sequence_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -1890,11 +1890,6 @@
             AXIS2_FREE(env->allocator, acks_to_str);
         }
         
-        if(rm_version)
-        {
-            AXIS2_FREE(env->allocator, rm_version);
-        }
-
         return AXIS2_SUCCESS;
     } 
 
@@ -1903,11 +1898,6 @@
         AXIS2_FREE(env->allocator, acks_to_str);
     }
         
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
     if(!conf_ctx)
     {
@@ -2340,7 +2330,7 @@
         reply_to_addr = sandesha2_seq_property_bean_get_value(reply_to_bean, 
env);
     }
 
-    rm_version = sandesha2_utils_get_rm_version(env, internal_sequence_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -2499,11 +2489,6 @@
                 internal_sequence_id, msg_id, is_svr_side, retrans_interval);
     }
 
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Exit:sandesha2_app_msg_processor_send_create_seq_msg");
 
@@ -2941,7 +2926,7 @@
         sandesha2_msg_ctx_set_to(rm_msg_ctx, env, to_epr);
     }
 
-    rm_version = sandesha2_utils_get_rm_version(env, internal_sequence_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, app_msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -2979,10 +2964,6 @@
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence not 
found");
             AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_SEQ, 
AXIS2_FAILURE);
-            if(rm_version)
-            {
-                AXIS2_FREE(env->allocator, rm_version);
-            }
             if(req_rm_msg)
             {
                 sandesha2_msg_ctx_free(req_rm_msg, env);
@@ -3149,11 +3130,6 @@
         engine = axis2_engine_create(env, conf_ctx);
         status = axis2_engine_resume_send(engine, env, app_msg_ctx);
 
-        if(rm_version)
-        {
-            AXIS2_FREE(env->allocator, rm_version);
-        }
-
         if(app_msg_sender_bean)
         {
             sandesha2_sender_bean_free(app_msg_sender_bean, env);
@@ -3211,11 +3187,6 @@
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Do not continue 
sending the message");
 
-        if(rm_version)
-        {
-            AXIS2_FREE(env->allocator, rm_version);
-        }
-
         if(reply_to_addr)
         {
             AXIS2_FREE(env->allocator, reply_to_addr);
@@ -3413,11 +3384,6 @@
             }
         }
 
-        if(rm_version)
-        {
-            AXIS2_FREE(env->allocator, rm_version);
-        }
-
         if(reply_to_addr)
         {
             AXIS2_FREE(env->allocator, reply_to_addr);
@@ -3479,11 +3445,6 @@
                 internal_sequence_id, msg_id, is_svr_side, retrans_interval, 
app_msg_ctx, rm_sequence);
     }
    
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     if(reply_to_addr)
     {
         AXIS2_FREE(env->allocator, reply_to_addr);
@@ -3665,7 +3626,7 @@
 
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, app_msg_ctx);
 
-    rm_version = sandesha2_utils_get_rm_version(env, internal_sequence_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, app_msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -4225,7 +4186,7 @@
         {
             axis2_char_t *spec_ver = NULL;
 
-            spec_ver = sandesha2_utils_get_rm_version(env, 
internal_sequence_id, seq_prop_mgr);
+            spec_ver = sandesha2_utils_get_rm_version(env, msg_ctx);
             if(!spec_ver)
             {
                 axutil_property_t *spec_ver_prop = NULL;
@@ -4239,11 +4200,6 @@
             {
                 last_msg = AXIS2_TRUE;
             }
-            if(spec_ver)
-            {
-                AXIS2_FREE(env->allocator, spec_ver);
-                spec_ver = NULL;
-            }
         }
     }
 

Modified: 
webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c 
Sun Nov  1 17:18:49 2009
@@ -452,7 +452,7 @@
     property = axutil_property_create_with_args(env, 0, 0, 0, 
AXIS2_VALUE_TRUE);
     axis2_msg_ctx_set_property(msg_ctx, env, 
SANDESHA2_APPLICATION_PROCESSING_DONE, property);
     axis2_msg_ctx_set_to(msg_ctx, env, axis2_endpoint_ref_create(env, 
to_address));
-    rm_version = sandesha2_utils_get_rm_version(env, int_seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -559,10 +559,6 @@
             property = axutil_property_create_with_args(env, 0, 0, 0, value);
             sandesha2_msg_ctx_set_property(close_rm_msg_ctx, env, 
AXIS2_TRANSPORT_URL, property);
         }
-        if(rm_version)
-        {
-            AXIS2_FREE(env->allocator, rm_version);
-        }
 
         if(!sandesha2_util_is_ack_already_piggybacked(env, close_rm_msg_ctx))
         {
@@ -645,10 +641,6 @@
             sandesha2_spec_specific_consts_get_close_seq_action(env, 
rm_version));
 
     temp_action = sandesha2_spec_specific_consts_get_close_seq_action(env, 
rm_version);
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
 
     soap_action = axutil_string_create(env, temp_action);
     axis2_msg_ctx_set_soap_action(msg_ctx, env, soap_action);

Modified: 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c 
(original)
+++ 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c 
Sun Nov  1 17:18:49 2009
@@ -865,7 +865,7 @@
     property = axutil_property_create_with_args(env, 0, 0, 0, 
AXIS2_VALUE_TRUE);
     axis2_msg_ctx_set_property(msg_ctx, env, 
SANDESHA2_APPLICATION_PROCESSING_DONE, property);
     axis2_msg_ctx_set_to(msg_ctx, env, axis2_endpoint_ref_create(env, 
to_address));
-    rm_version = sandesha2_utils_get_rm_version(env, int_seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -903,10 +903,6 @@
             sandesha2_spec_specific_consts_get_terminate_seq_action(env, 
rm_version));
 
     temp_action = 
sandesha2_spec_specific_consts_get_terminate_seq_soap_action(env, rm_version);
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
 
     soap_action = axutil_string_create(env, temp_action);
     axis2_msg_ctx_set_soap_action(msg_ctx, env, soap_action);

Modified: webservices/sandesha/trunk/c/src/util/msg_creator.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creator.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Sun Nov  1 17:18:49 2009
@@ -172,7 +172,7 @@
     create_seq_rm_msg = sandesha2_msg_ctx_create(env, create_seq_msg_ctx);
 
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
"create_seq_internal_seq_id:%s", internal_seq_id);
-    rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, application_msg_ctx);
 
     if(!rm_version)
     {
@@ -314,11 +314,6 @@
     sandesha2_msg_ctx_add_soap_envelope(create_seq_rm_msg, env);
     temp_action = sandesha2_spec_specific_consts_get_create_seq_action(env, 
rm_version);
 
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     sandesha2_msg_ctx_set_wsa_action(create_seq_rm_msg, env, temp_action);
 
     temp_soap_action = axutil_string_create(env, temp_action);
@@ -375,7 +370,7 @@
     temp_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(create_seq_msg, env);
     conf_ctx = axis2_msg_ctx_get_conf_ctx(temp_msg_ctx, env);
     cs = sandesha2_msg_ctx_get_create_seq(create_seq_msg, env);
-    rm_version = sandesha2_utils_get_rm_version(env, new_seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, temp_msg_ctx);
 
     if(!rm_version)
     {
@@ -450,11 +445,6 @@
     sandesha2_create_seq_res_to_om_node(create_seq_res, env, temp_om_node);
     temp_action = 
sandesha2_spec_specific_consts_get_create_seq_res_action(env, rm_version);
 
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     axis2_msg_ctx_set_wsa_action(out_msg, env, temp_action);
 
     soap_action = axutil_string_create(env, temp_action);
@@ -543,7 +533,7 @@
     close_seq_msg_id = (axis2_char_t*)axis2_msg_ctx_get_msg_id(
                         close_seq_msg_ctx, env);
 
-    rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, ref_msg_ctx);
     if(!rm_version)
     {
         AXIS2_ERROR_SET(env->error, 
@@ -556,11 +546,6 @@
 
     is_seq_res_reqd = sandesha2_spec_specific_consts_is_term_seq_res_reqd(env, 
rm_version);
 
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     if(!is_seq_res_reqd)
     {
         axis2_msg_ctx_set_property(close_seq_msg_ctx, env, AXIS2_TRANSPORT_IN, 
NULL);
@@ -666,14 +651,10 @@
     envelope = axiom_soap_envelope_create_default_soap_envelope(env, 
soap_version);
     sandesha2_msg_ctx_set_soap_envelope(close_seq_res_rm_msg_ctx, env, 
envelope);
     sandesha2_msg_ctx_set_close_seq_res(close_seq_res_rm_msg_ctx, env, 
close_seq_res);
-    rm_version = sandesha2_utils_get_rm_version(env, seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, temp_msg_ctx);
     temp_action = sandesha2_spec_specific_consts_get_close_seq_res_action(env, 
rm_version);
     axis2_msg_ctx_set_wsa_action(out_msg, env, temp_action);
     temp_action = sandesha2_spec_specific_consts_get_close_seq_res_action(env, 
rm_version);
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
 
     soap_action = axutil_string_create(env, temp_action);
     axis2_msg_ctx_set_soap_action(out_msg, env, soap_action);
@@ -739,7 +720,7 @@
     terminate_seq_msg_id = (axis2_char_t*)axis2_msg_ctx_get_msg_id(
                         terminate_seq_msg_ctx, env);
 
-    rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, 
seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, ref_msg_ctx);
     if(!rm_version)
     {
         AXIS2_ERROR_SET(env->error, 
@@ -752,11 +733,6 @@
 
     is_seq_res_reqd = sandesha2_spec_specific_consts_is_term_seq_res_reqd(env, 
rm_version);
 
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
-
     if(!is_seq_res_reqd)
     {
         axis2_msg_ctx_set_property(terminate_seq_msg_ctx, env, 
AXIS2_TRANSPORT_IN, NULL);
@@ -851,17 +827,13 @@
     sandesha2_msg_ctx_set_soap_envelope(res_rm_msg, env, soap_envelope);
     sandesha2_msg_ctx_set_terminate_seq_res(res_rm_msg, env, 
         terminate_seq_res);
-    rm_version = sandesha2_utils_get_rm_version(env, seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, 
sandesha2_msg_ctx_get_msg_ctx(ref_rm_msg, env));
     if(!rm_version)
     {
         rm_version = axutil_strdup(env, 
sandesha2_msg_ctx_get_rm_spec_ver(ref_rm_msg, env));
     }
 
     temp_action = 
sandesha2_spec_specific_consts_get_teminate_seq_res_action(env, rm_version);
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
 
     axis2_msg_ctx_set_wsa_action(out_msg, env, temp_action);
     soap_action = axutil_string_create(env, temp_action);
@@ -1085,7 +1057,7 @@
 
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(target_rm_msg_ctx, env);
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-    rm_version = sandesha2_utils_get_rm_version(env, seq_id, seq_prop_mgr);
+    rm_version = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_version)
     {
         AXIS2_ERROR_SET(env->error, 
@@ -1170,10 +1142,6 @@
     }
 
     temp_action = sandesha2_spec_specific_consts_get_seq_ack_soap_action(env, 
rm_version);
-    if(rm_version)
-    {
-        AXIS2_FREE(env->allocator, rm_version);
-    }
 
     ack_req_soap_action = axutil_string_create(env, temp_action);
     if(ack_req_soap_action)

Modified: webservices/sandesha/trunk/c/src/util/msg_init.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_init.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_init.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_init.c Sun Nov  1 17:18:49 2009
@@ -426,8 +426,7 @@
         axis2_char_t *spec_version = NULL;
         axis2_char_t *seq_rm_ns = NULL;
         
-        spec_version = sandesha2_utils_get_rm_version(env, prop_key, 
-            seq_prop_mgr);
+        spec_version = sandesha2_utils_get_rm_version(env, temp_msg_ctx);
         if(prop_key)
         {
             AXIS2_FREE(env->allocator, prop_key);
@@ -438,8 +437,6 @@
             seq_rm_ns = sandesha2_spec_specific_consts_get_rm_ns_val(env, 
                     spec_version);
         }
-        if(spec_version)
-            AXIS2_FREE(env->allocator, spec_version);
         if(seq_rm_ns && rm_ns)
         {
             if(0 != axutil_strcmp(seq_rm_ns, rm_ns))

Modified: webservices/sandesha/trunk/c/src/util/property_bean.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_bean.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_bean.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_bean.c Sun Nov  1 17:18:49 
2009
@@ -36,6 +36,7 @@
     int terminate_delay;
     int polling_delay;
     axis2_char_t *db_path;
+    axis2_char_t *spec_version;
 };
 
 AXIS2_EXTERN sandesha2_property_bean_t* AXIS2_CALL
@@ -63,6 +64,7 @@
     bean->terminate_delay = 0;
     bean->polling_delay = 0;
     bean->db_path = NULL;
+    bean->spec_version = NULL;
     
        return bean;
 }
@@ -97,6 +99,12 @@
         AXIS2_FREE(env->allocator, bean->storage_mgr);
         bean->storage_mgr = NULL;
     }
+
+    if(bean->spec_version)
+    {
+        AXIS2_FREE(env->allocator, bean->spec_version);
+        bean->spec_version = NULL;
+    }
        AXIS2_FREE(env->allocator, bean);
        return;
 }
@@ -344,3 +352,22 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_char_t* AXIS2_CALL
+sandesha2_property_bean_get_spec_version(
+    sandesha2_property_bean_t *bean,
+    const axutil_env_t *env)
+{
+    return bean->spec_version;
+}
+            
+axis2_status_t AXIS2_CALL
+sandesha2_property_bean_set_spec_version(
+    sandesha2_property_bean_t *bean,
+    const axutil_env_t *env, 
+    axis2_char_t *spec_version)
+{
+    AXIS2_PARAM_CHECK(env->error, spec_version, AXIS2_FAILURE);
+    bean->spec_version = axutil_strdup(env, spec_version);
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/sandesha/trunk/c/src/util/property_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_mgr.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_mgr.c Sun Nov  1 17:18:49 
2009
@@ -285,6 +285,7 @@
     int terminate_delay = -1;
     int polling_delay = -1;
     axis2_char_t *polling_delay_str = NULL; 
+    axis2_char_t *spec_version = NULL; 
 
     AXIS2_PARAM_CHECK(env->error, rm_assertion, NULL);
     
@@ -400,6 +401,12 @@
             AXIS2_FREE(env->allocator, str);
         }
     }
+    
+    spec_version = axis2_rm_assertion_get_spec_version(rm_assertion, env);
+    if(spec_version)
+    {
+        sandesha2_property_bean_set_spec_version(property_bean, env, 
spec_version);        
+    }
 
     return property_bean;
 }

Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Sun Nov  1 17:18:49 
2009
@@ -151,25 +151,19 @@
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 sandesha2_utils_get_rm_version(
     const axutil_env_t *env,
-    axis2_char_t *key,
-    sandesha2_seq_property_mgr_t *seq_prop_mgr)
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_char_t *value = NULL;
-    sandesha2_seq_property_bean_t *rm_version_bean = NULL;
-    
-    AXIS2_PARAM_CHECK(env->error, key, NULL);
+    sandesha2_property_bean_t *prop_bean = NULL;
+    axis2_svc_t *svc = NULL;
     
-    if(seq_prop_mgr)
+    svc = axis2_msg_ctx_get_svc(msg_ctx, env);
+    prop_bean = sandesha2_utils_get_property_bean(env, svc);
+    if(prop_bean)
     {
-        rm_version_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, 
-            env, key, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
+        value = sandesha2_property_bean_get_spec_version(prop_bean, env);
     }
-    if(!rm_version_bean)
-    {
-        return NULL;
-    }
-    value = axutil_strdup(env, 
sandesha2_seq_property_bean_get_value(rm_version_bean, env));
-    sandesha2_seq_property_bean_free(rm_version_bean, env);
+    
     return value;
 }
 

Modified: webservices/sandesha/trunk/c/src/util/terminate_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/terminate_mgr.c?rev=831712&r1=831711&r2=831712&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Sun Nov  1 17:18:49 
2009
@@ -918,7 +918,7 @@
         sandesha2_msg_ctx_set_to(terminate_rm_msg_ctx, env, to_epr);
     }
 
-    rm_ver = sandesha2_utils_get_rm_version(env, internal_sequence_id, 
seq_prop_mgr);
+    rm_ver = sandesha2_utils_get_rm_version(env, msg_ctx);
     if(!rm_ver)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find the 
rm version for msg");
@@ -1000,11 +1000,6 @@
         /*sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, 
internal_sequence_id, 
                 is_svr_side, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);*/
 
-        if(rm_ver)
-        {
-            AXIS2_FREE(env->allocator, rm_ver);
-        }
-
         if(terminate_rm_msg_ctx)
         {
             sandesha2_msg_ctx_free(terminate_rm_msg_ctx, env);
@@ -1214,11 +1209,6 @@
         }
     }
     
-    if(rm_ver)
-    {
-        AXIS2_FREE(env->allocator, rm_ver);
-    }
-
     sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, 
terminate_msg_ctx, AXIS2_TRUE);
 
     if(terminate_sender_bean)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to